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

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 10:51:45 PDT 2016


compnerd added inline comments.

================
Comment at: ELF/MarkLive.cpp:190
@@ +189,3 @@
+  // sections that contain personality. We preserve all non-text sections
+  // reffered by .eh_frame here.
+  for (const std::unique_ptr<ObjectFile<ELFT>> &F : Symtab->getObjectFiles())
----------------
Nit: you misspelt referred.

================
Comment at: ELF/MarkLive.cpp:194
@@ +193,3 @@
+      if (auto *EH = dyn_cast_or_null<EHInputSection<ELFT>>(Sec))
+        scanEhFrameSection<ELFT>(*EH);
+
----------------
Is there a reason to not just merge this into the loops above?  It seems unnecessary to re-iterate the objects and sections within the objects.

================
Comment at: test/ELF/eh-frame-gc.s:21
@@ +20,2 @@
+DW.ref.__gxx_personality_v0:
+ .long 0
----------------
Might be able to drop the .long 0 as well.  Just thought of that, haven't had a chance to try it.


http://reviews.llvm.org/D19656





More information about the llvm-commits mailing list