[lld] r260976 - Merge multiple .gcc_except_table.* into a single section.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 16 08:05:27 PST 2016


Author: rafael
Date: Tue Feb 16 10:05:27 2016
New Revision: 260976

URL: http://llvm.org/viewvc/llvm-project?rev=260976&view=rev
Log:
Merge multiple .gcc_except_table.* into a single section.

Modified:
    lld/trunk/ELF/Writer.cpp
    lld/trunk/test/ELF/section-name.s

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=260976&r1=260975&r2=260976&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Tue Feb 16 10:05:27 2016
@@ -732,9 +732,9 @@ StringRef Writer<ELFT>::getOutputSection
     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;

Modified: lld/trunk/test/ELF/section-name.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/section-name.s?rev=260976&r1=260975&r2=260976&view=diff
==============================================================================
--- lld/trunk/test/ELF/section-name.s (original)
+++ lld/trunk/test/ELF/section-name.s Tue Feb 16 10:05:27 2016
@@ -22,9 +22,11 @@ _start:
 .section .data.rel.ro.local,"aw",%progbits
 .section .data.rel.ro.local.a,"aw",%progbits
 .section .tbss.foo,"aGwT", at nobits,foo,comdat
+.section .gcc_except_table._Z1fIiEvv,"aG", at 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 ({{.*}})




More information about the llvm-commits mailing list