Merge multiple .gcc_except_table.* into a single section.

llvm-svn: 260976
This commit is contained in:
Rafael Espindola 2016-02-16 16:05:27 +00:00
parent c8e5fc3c08
commit 1492820aaa
2 changed files with 5 additions and 3 deletions

View File

@ -732,9 +732,9 @@ StringRef Writer<ELFT>::getOutputSectionName(InputSectionBase<ELFT> *S) const {
return Dest;
StringRef Name = S->getSectionName();
for (StringRef V :
{".text.", ".rodata.", ".data.rel.ro.", ".data.", ".bss.",
".init_array.", ".fini_array.", ".ctors.", ".dtors.", ".tbss."})
for (StringRef V : {".text.", ".rodata.", ".data.rel.ro.", ".data.", ".bss.",
".init_array.", ".fini_array.", ".ctors.", ".dtors.",
".tbss.", ".gcc_except_table."})
if (Name.startswith(V))
return V.drop_back();
return Name;

View File

@ -22,9 +22,11 @@ _start:
.section .data.rel.ro.local,"aw",%progbits
.section .data.rel.ro.local.a,"aw",%progbits
.section .tbss.foo,"aGwT",@nobits,foo,comdat
.section .gcc_except_table._Z1fIiEvv,"aG",@progbits,_Z1fIiEvv,comdat
// CHECK-NOT: Name: .rodata.a
// CHECK: Name: .rodata
// CHECK: Name: .gcc_except_table ({{.*}})
// CHECK-NOT: Name: .text.a
// CHECK: Name: .text
// CHECK: Name: .tbss ({{.*}})