[llvm-commits] [llvm] r131952 - /llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
Rafael Espindola
rafael.espindola at gmail.com
Mon May 23 20:10:31 PDT 2011
Author: rafael
Date: Mon May 23 22:10:31 2011
New Revision: 131952
URL: http://llvm.org/viewvc/llvm-project?rev=131952&view=rev
Log:
Explain FIXME.
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=131952&r1=131951&r2=131952&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Mon May 23 22:10:31 2011
@@ -225,10 +225,11 @@
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.
+ // N.B.: The defaults used in here are no the same ones used in MC.
+ // We follow gcc, MC follows gas. For example, given ".section .eh_frame",
+ // both gas and MC will produce a section with no flags. Given
+ // section(".eh_frame") gcc will produce
+ // .section .eh_frame,"a", at progbits
if (Name.empty() || Name[0] != '.') return K;
// Some lame default implementation based on some magic section names.
More information about the llvm-commits
mailing list