[PATCH] D13188: [MachO] Stop generating *coal* sections.
Akira Hatanaka via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 25 19:33:50 PDT 2015
ahatanak created this revision.
ahatanak added a subscriber: llvm-commits.
Some background on why we don't have to use *coal* sections anymore:
Long ago when C++ was new and "weak" had not been standardized, an attempt was made in cctools to support C++ inlines that can be coalesced by putting them into their own section (__TEXT/__textcoal_nt instead of __TEXT/__text).
The current macho linker supports the weak-def bit on any symbol to allow it to be coalesced, but the compiler still puts weak-def functions/data into alternate section names, which the linker must map back to the base section name.
This patch makes changes that are necessary to prevent the compiler and asssembler from using the "coal" sections and have them use the base sections instead when the target architecture is not powerpc:
__TEXT/__textcoal_nt instead use __TEXT/__text
__TEXT/__const_coal instead use __TEXT/__const
__DATA/__datacoal_nt instead use __DATA/__data
If the target is powerpc, we continue to use the *coal* sections since anyone targeting powerpc is probably using an old linker that doesn't have support for the weak-def bits.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 13198 bytes
Desc: not available
More information about the llvm-commits