[PATCH] D19656: [ELF] - keep alive all non-text sections referenced by .eh_frame

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 30 08:59:27 PDT 2016


rafael accepted this revision.
rafael added a comment.

LGTM with nits.

I now remember that eh can point to LSDA, but lets get this fixed first.


================
Comment at: ELF/MarkLive.cpp:78
@@ +77,3 @@
+static void run(ELFFile<ELFT> &Obj, InputSectionBase<ELFT> *Sec,
+                Elf_Shdr *RelSec, Func Fn) {
+  typedef typename ELFT::Rel Elf_Rel;
----------------
Please use std::function<void(ResolvedReloc<ELFT>)> to mach the declaration of forEachSuccessor.

================
Comment at: ELF/MarkLive.cpp:79
@@ +78,3 @@
+                Elf_Shdr *RelSec, Func Fn) {
+  typedef typename ELFT::Rel Elf_Rel;
+  typedef typename ELFT::Rela Elf_Rela;
----------------
These now have a single use each, please inline.

================
Comment at: ELF/MarkLive.cpp:94
@@ -78,5 +93,3 @@
                              std::function<void(ResolvedReloc<ELFT>)> Fn) {
-  typedef typename ELFT::Rel Elf_Rel;
-  typedef typename ELFT::Rela Elf_Rela;
   typedef typename ELFT::Shdr Elf_Shdr;
 
----------------
Single use typedef.

================
Comment at: test/ELF/eh-frame-gc.s:9
@@ +8,3 @@
+# CHECK: Sections [
+# CHECK: Name: .data
+
----------------
Give the section a more unique name like test_personality_section.


http://reviews.llvm.org/D19656





More information about the llvm-commits mailing list