[PATCH] D19656: [ELF] - keep alive all non-text sections referenced by .eh_frame
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 29 09:01:06 PDT 2016
grimar added inline comments.
================
Comment at: ELF/MarkLive.cpp:102
@@ +101,3 @@
+template <class ELFT> static void scanEhFrameSection(EHInputSection<ELFT> &EH) {
+ typedef typename ELFT::Shdr Elf_Shdr;
+ if (!EH.RelocSection)
----------------
compnerd wrote:
> Unused typedef.
Fixed.
================
Comment at: ELF/MarkLive.cpp:194
@@ +193,3 @@
+ if (auto *EH = dyn_cast_or_null<EHInputSection<ELFT>>(Sec))
+ scanEhFrameSection<ELFT>(*EH);
+
----------------
grimar wrote:
> compnerd wrote:
> > 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.
> I tried both ways when wrote that and finally decided to split eh_frame processing as special case just to emphasize its exceptional nature. Have no real preference here.
After revisiting this, merged into one loop to avoid additional iteration.
================
Comment at: test/ELF/eh-frame-gc.s:21
@@ +20,2 @@
+DW.ref.__gxx_personality_v0:
+ .long 0
----------------
compnerd wrote:
> Might be able to drop the .long 0 as well. Just thought of that, haven't had a chance to try it.
Done.
http://reviews.llvm.org/D19656
More information about the llvm-commits
mailing list