diff options
-rw-r--r-- | lld/ELF/Writer.cpp | 2 | ||||
-rw-r--r-- | lld/test/ELF/section-name.s | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 8bb719a62ea..30fec493cc9 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -734,7 +734,7 @@ StringRef Writer<ELFT>::getOutputSectionName(InputSectionBase<ELFT> *S) const { StringRef Name = S->getSectionName(); for (StringRef V : {".text.", ".rodata.", ".data.rel.ro.", ".data.", ".bss.", ".init_array.", ".fini_array.", ".ctors.", ".dtors.", - ".tbss.", ".gcc_except_table."}) + ".tbss.", ".gcc_except_table.", ".tdata."}) if (Name.startswith(V)) return V.drop_back(); return Name; diff --git a/lld/test/ELF/section-name.s b/lld/test/ELF/section-name.s index 3d82085c94b..f470c48c6a3 100644 --- a/lld/test/ELF/section-name.s +++ b/lld/test/ELF/section-name.s @@ -22,13 +22,15 @@ _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 +.section .gcc_except_table.foo,"aG",@progbits,foo,comdat +.section .tdata.foo,"aGwT",@progbits,foo,comdat // CHECK-NOT: Name: .rodata.a // CHECK: Name: .rodata // CHECK: Name: .gcc_except_table ({{.*}}) // CHECK-NOT: Name: .text.a // CHECK: Name: .text +// CHECK: Name: .tdata ({{.*}}) // CHECK: Name: .tbss ({{.*}}) // CHECK-NOT: Name: .data.rel.ro.a // CHECK-NOT: Name: .data.rel.ro.local.a |