[llvm-commits] [llvm] r78963 - /llvm/trunk/lib/MC/MCSectionELF.cpp
Dan Gohman
gohman at apple.com
Thu Aug 13 16:56:34 PDT 2009
Author: djg
Date: Thu Aug 13 18:56:34 2009
New Revision: 78963
URL: http://llvm.org/viewvc/llvm-project?rev=78963&view=rev
Log:
Fix MCSectionELF::ShouldOmitSectionDirective's matching of .data and
friends so that it doesn't match sections like .data.rel.local, which
should not be emitted as section directives.
Modified:
llvm/trunk/lib/MC/MCSectionELF.cpp
Modified: llvm/trunk/lib/MC/MCSectionELF.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCSectionELF.cpp?rev=78963&r1=78962&r2=78963&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCSectionELF.cpp (original)
+++ llvm/trunk/lib/MC/MCSectionELF.cpp Thu Aug 13 18:56:34 2009
@@ -27,9 +27,9 @@
const TargetAsmInfo &TAI) const {
// FIXME: Does .section .bss/.data/.text work everywhere??
- if (strncmp(Name, ".text", 5) == 0 ||
- strncmp(Name, ".data", 5) == 0 ||
- (strncmp(Name, ".bss", 4) == 0 &&
+ if (strcmp(Name, ".text") == 0 ||
+ strcmp(Name, ".data") == 0 ||
+ (strcmp(Name, ".bss") == 0 &&
!TAI.usesELFSectionDirectiveForBSS()))
return true;
More information about the llvm-commits
mailing list