diff options
author | Dan Gohman <gohman@apple.com> | 2009-08-13 23:56:34 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-08-13 23:56:34 +0000 |
commit | 86cba32bb4858f988b5026b62a66c4dba473f08b (patch) | |
tree | c4e0934342cf63e6c31150397efa33033964b530 /lib/MC/MCSectionELF.cpp | |
parent | 789457847002f5289dbbc5cfce9d68c72e00bed1 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78963 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCSectionELF.cpp')
-rw-r--r-- | lib/MC/MCSectionELF.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/MC/MCSectionELF.cpp b/lib/MC/MCSectionELF.cpp index 6e6f9990fe..246bf4adac 100644 --- a/lib/MC/MCSectionELF.cpp +++ b/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; |