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
This commit is contained in:
Dan Gohman 2009-08-13 23:56:34 +00:00
parent 9abdc6cc3c
commit 3e0bd7852f
1 changed files with 3 additions and 3 deletions

View File

@ -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;