From 1492820aaa32e73f8d69d599853fc10d4944458f Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 16 Feb 2016 16:05:27 +0000 Subject: [PATCH] Merge multiple .gcc_except_table.* into a single section. llvm-svn: 260976 --- lld/ELF/Writer.cpp | 6 +++--- lld/test/ELF/section-name.s | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 8c5451ab058b..8bb719a62ea8 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -732,9 +732,9 @@ StringRef Writer::getOutputSectionName(InputSectionBase *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; diff --git a/lld/test/ELF/section-name.s b/lld/test/ELF/section-name.s index 9e5deb1d4fcb..3d82085c94b1 100644 --- a/lld/test/ELF/section-name.s +++ b/lld/test/ELF/section-name.s @@ -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 ({{.*}})