forked from OSchip/llvm-project
Merge multiple .gcc_except_table.* into a single section.
llvm-svn: 260976
This commit is contained in:
parent
c8e5fc3c08
commit
1492820aaa
|
@ -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;
|
||||
|
|
|
@ -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 ({{.*}})
|
||||
|
|
Loading…
Reference in New Issue