From: Rafael Espindola Date: Wed, 22 Mar 2017 14:04:19 +0000 (+0000) Subject: Add default typo to .tbss.* X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=30582488b0d9d8b8e0e9efc0c1e27f3f76680689;p=llvm Add default typo to .tbss.* This matches gas behavior and is part of pr31888. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298508 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/MC/MCParser/ELFAsmParser.cpp b/lib/MC/MCParser/ELFAsmParser.cpp index 63b1dd081a2..3476a02e0fd 100644 --- a/lib/MC/MCParser/ELFAsmParser.cpp +++ b/lib/MC/MCParser/ELFAsmParser.cpp @@ -573,6 +573,8 @@ EndStmt: Type = ELF::SHT_INIT_ARRAY; else if (hasPrefix(SectionName, ".bss.")) Type = ELF::SHT_NOBITS; + else if (hasPrefix(SectionName, ".tbss.")) + Type = ELF::SHT_NOBITS; else if (SectionName == ".fini_array") Type = ELF::SHT_FINI_ARRAY; else if (SectionName == ".preinit_array") diff --git a/test/MC/AsmParser/section_names.s b/test/MC/AsmParser/section_names.s index a7ba535ea13..38a5310099d 100644 --- a/test/MC/AsmParser/section_names.s +++ b/test/MC/AsmParser/section_names.s @@ -36,6 +36,10 @@ .space 1 .section .bss.foo .space 1 +.section .tbss +.space 1 +.section .tbss.foo +.space 1 # CHECK: Name: .nobits # CHECK-NEXT: Type: SHT_PROGBITS # CHECK: Name: .nobits2 @@ -72,3 +76,7 @@ # CHECK-NEXT: Type: SHT_NOBITS # CHECK: Name: .bss.foo # CHECK-NEXT: Type: SHT_NOBITS +# CHECK: Name: .tbss +# CHECK-NEXT: Type: SHT_NOBITS +# CHECK: Name: .tbss.foo +# CHECK-NEXT: Type: SHT_NOBITS