[llvm-commits] [llvm] r126421 - /llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
Rafael Espindola
rafael.espindola at gmail.com
Thu Feb 24 12:18:02 PST 2011
Author: rafael
Date: Thu Feb 24 14:18:01 2011
New Revision: 126421
URL: http://llvm.org/viewvc/llvm-project?rev=126421&view=rev
Log:
Fix llvm-gcc bootstrap with gnu ld.
The problem was codegen guessing the wrong values and printing
.section .eh_frame,"aMS", at progbits,4
It is not clear at all if Codegen should try to guess, MC is the
one that should know the default flags.
Modified:
llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
Modified: llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp?rev=126421&r1=126420&r2=126421&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Thu Feb 24 14:18:01 2011
@@ -178,6 +178,10 @@
static SectionKind
getELFKindForNamedSection(StringRef Name, SectionKind K) {
+ // FIXME: Why is this here? Codegen is should not be in the business
+ // of figuring section flags. If the user wrote section(".eh_frame"),
+ // we should just pass that to MC which will defer to the assembly
+ // or use its default if producing an object file.
if (Name.empty() || Name[0] != '.') return K;
// Some lame default implementation based on some magic section names.
@@ -203,6 +207,9 @@
Name.startswith(".llvm.linkonce.tb."))
return SectionKind::getThreadBSS();
+ if (Name == ".eh_frame")
+ return SectionKind::getDataRel();
+
return K;
}
More information about the llvm-commits
mailing list