no_dead_strip sections are not atomized
kledzik at apple.com
Thu Mar 27 09:44:50 PDT 2014
On Mar 5, 2014, at 6:56 PM, Rafael Espíndola wrote:
> I noticed that some objc related symbols would change from L to l if
> llvm was left to choose instead of using the magic '\01' prefix. It
> seems that the difference is always in no_dead_strip sections, which I
> assume are never atomized.
> The attached patch fixes that.
Practically speaking, I don't think this will change any linker output.
In the test case the __DATA, __objc_classlist section is an array of pointers to ObjC classes. The section is marked don't dead-strip because ObjC is a dynamic language and classes can be instantiated by their string name at runtime. Therefore, the linker should not dead strip any ObjC stuff. We do that today by marking that section don't dead strip.
The choice of an 'l' vs 'L' label is the choice of whether the linker internally sees the sections as a bunch of atoms or one big atom. With no-dead-strip sections, the result will be the same.
More information about the llvm-commits