diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-11-06 02:42:03 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-11-06 02:42:03 +0000 |
commit | bf77ed68265cbf04981ffd1c1b7c6ee1a22945ba (patch) | |
tree | 39f2161bbfcf8e9b589c6fcc18a2f3cb44304258 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 7fea87cb59fda604b2a91884896b4de4da60638c (diff) | |
download | llvm-bf77ed68265cbf04981ffd1c1b7c6ee1a22945ba.zip llvm-bf77ed68265cbf04981ffd1c1b7c6ee1a22945ba.tar.gz llvm-bf77ed68265cbf04981ffd1c1b7c6ee1a22945ba.tar.bz2 |
Allow L symbols in no_dead_strip sections.
If a section cannot be dead stripped, it is safe to use L symbols, since
the linker will keep all of it in the end.
llvm-svn: 221431
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index c7570ba..6944f71 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -588,6 +588,10 @@ bool TargetLoweringObjectFileMachO::isSectionAtomizableBySymbols( SMO.getSectionName() == "__cfstring") return false; + // no_dead_strip sections are not atomized in practice. + if (SMO.hasAttribute(MachO::S_ATTR_NO_DEAD_STRIP)) + return false; + switch (SMO.getType()) { default: return true; |