I knew that if you define a bunch of @ "" NSString objects in the source code on Mac OS. These NSStrings will be stored in a segment in the Mach-O library.
Section sectname __ustring segname __TEXT addr 0x000b3b54 size 0x000001b7 offset 731988 align 2^1 (2) reloff 0 nreloc 0 flags 0x00000000 reserved1 0 reserved2 0
If I have a binary hex dump, they align close together with 0x0000 as a delimiter. I want to know how the bootloader on Mac OS X loads these NSStrings when the program starts? Are they easy to load, recognizing the 0x0000 delimiter, or is it a line offset table somewhere else in the binary that points to individual NSString objects? Thanks.
(What I really want to do is increase the length of one of the NSString, so I need to know how the loader recognizes these individual objects)
added: I know if you define CStrings as @ "abc" in the code to be passed to the cstring segment. If it is a string of type @ "" "without ascii characters, it will be passed to the ustring section according to my digging.
source share