[llvm] r298508 - Add default typo to .tbss.*
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 22 07:04:19 PDT 2017
Author: rafael
Date: Wed Mar 22 09:04:19 2017
New Revision: 298508
URL: http://llvm.org/viewvc/llvm-project?rev=298508&view=rev
Log:
Add default typo to .tbss.*
This matches gas behavior and is part of pr31888.
Modified:
llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp
llvm/trunk/test/MC/AsmParser/section_names.s
Modified: llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp?rev=298508&r1=298507&r2=298508&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp Wed Mar 22 09:04:19 2017
@@ -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")
Modified: llvm/trunk/test/MC/AsmParser/section_names.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/section_names.s?rev=298508&r1=298507&r2=298508&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/section_names.s (original)
+++ llvm/trunk/test/MC/AsmParser/section_names.s Wed Mar 22 09:04:19 2017
@@ -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
More information about the llvm-commits
mailing list