diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-08-07 23:42:09 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-08-07 23:42:09 +0000 |
commit | d3a951026462713a377c0fe616bf512de59a56bc (patch) | |
tree | 259a87e03a88ceb7694bf77241b9c5eb6637f72a /lib | |
parent | c348ad00e5a0b04df6a7cba83b6e77ab81f28de1 (diff) | |
download | external_llvm-d3a951026462713a377c0fe616bf512de59a56bc.zip external_llvm-d3a951026462713a377c0fe616bf512de59a56bc.tar.gz external_llvm-d3a951026462713a377c0fe616bf512de59a56bc.tar.bz2 |
Reapply r185872 now that the address sanitizer has been changed to support this.
Original commit message:
Stop emitting weak symbols into the "coal" sections.
The Mach-O linker has been able to support the weak-def bit on any symbol for
quite a while now. The compiler however continued to place these symbols into a
"coal" section, which required the linker to map them back to the base section
name.
Replace the sections like this:
__TEXT/__textcoal_nt instead use __TEXT/__text
__TEXT/__const_coal instead use __TEXT/__const
__DATA/__datacoal_nt instead use __DATA/__data
<rdar://problem/14265330>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187939 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 07cf871..7d9382e 100644 --- a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -524,14 +524,14 @@ const MCSection *TargetLoweringObjectFileMachO:: SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler *Mang, const TargetMachine &TM) const { if (Kind.isText()) - return GV->isWeakForLinker() ? TextCoalSection : TextSection; - - // If this is weak/linkonce, put this in a coalescable section, either in text - // or data depending on if it is writable. + return TextSection; + + // If this is weak/linkonce, put this in a read only or data section depending + // on whether or not it's writable. if (GV->isWeakForLinker()) { if (Kind.isReadOnly()) - return ConstTextCoalSection; - return DataCoalSection; + return ReadOnlySection; + return DataSection; } // FIXME: Alignment check should be handled by section classifier. |