diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-02-24 20:18:01 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-02-24 20:18:01 +0000 |
commit | 601a11edd44f73d69f4ce4a96f79d17631dfc469 (patch) | |
tree | e58517e1005ecd0b7ecdd6684e16205a6c05b0ad /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 17e3d193e185b97b603b90ba60ea1d8e18a1462a (diff) | |
download | bcm5719-llvm-601a11edd44f73d69f4ce4a96f79d17631dfc469.tar.gz bcm5719-llvm-601a11edd44f73d69f4ce4a96f79d17631dfc469.zip |
Fix llvm-gcc bootstrap with gnu ld.
The problem was codegen guessing the wrong values and printing
.section .eh_frame,"aMS",@progbits,4
It is not clear at all if Codegen should try to guess, MC is the
one that should know the default flags.
llvm-svn: 126421
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index e4d9ee02e7c..fa311dc5d66 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -178,6 +178,10 @@ const MCSection *TargetLoweringObjectFileELF::getEHFrameSection() const { 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 @@ getELFKindForNamedSection(StringRef Name, SectionKind K) { Name.startswith(".llvm.linkonce.tb.")) return SectionKind::getThreadBSS(); + if (Name == ".eh_frame") + return SectionKind::getDataRel(); + return K; } |