summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-08-07 23:42:09 +0000
committerBill Wendling <isanbard@gmail.com>2013-08-07 23:42:09 +0000
commitb80f9791e4deb0b50a870654c2109d0abaf68fbd (patch)
tree862cfb34ac89b93e2b7c97e4b71bce1aee69382b /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent6d8d755ccf428d8f9efb5f8d6621482b96ca5c58 (diff)
downloadbcm5719-llvm-b80f9791e4deb0b50a870654c2109d0abaf68fbd.tar.gz
bcm5719-llvm-b80f9791e4deb0b50a870654c2109d0abaf68fbd.zip
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> llvm-svn: 187939
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 07cf871cef6..7d9382e5233 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud