summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-08-13 23:56:34 +0000
committerDan Gohman <gohman@apple.com>2009-08-13 23:56:34 +0000
commit3e0bd7852f4900cb153733b38a9a6e9c667705f3 (patch)
tree9b8ee30cbf544046ea674c1bd08a1510480402ac /llvm
parent9abdc6cc3ce57c7ff8d44453d1e413ab920ca823 (diff)
downloadbcm5719-llvm-3e0bd7852f4900cb153733b38a9a6e9c667705f3.tar.gz
bcm5719-llvm-3e0bd7852f4900cb153733b38a9a6e9c667705f3.zip
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. llvm-svn: 78963
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/MC/MCSectionELF.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/MC/MCSectionELF.cpp b/llvm/lib/MC/MCSectionELF.cpp
index 6e6f9990fe8..246bf4adac8 100644
--- a/llvm/lib/MC/MCSectionELF.cpp
+++ b/llvm/lib/MC/MCSectionELF.cpp
@@ -27,9 +27,9 @@ bool MCSectionELF::ShouldOmitSectionDirective(const char *Name,
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;
OpenPOWER on IntegriCloud