From bf77ed68265cbf04981ffd1c1b7c6ee1a22945ba Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 6 Nov 2014 02:42:03 +0000 Subject: 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 --- llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp') diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index c7570ba76e1..6944f71105b 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; -- cgit v1.2.3