[PATCH] D15712: [ELF] - implemented --eh-frame-hdr command line option.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 13 14:50:59 PST 2016


grimar added inline comments.

================
Comment at: ELF/OutputSections.cpp:825
@@ +824,3 @@
+    // The last four bytes are an offset to the FDE data itself.
+    uintX_t FdeDataOff = EhVA + I.second - VA;
+    write32<E>(Buf + 4, FdeDataOff);
----------------
ruiu wrote:
> grimar wrote:
> > ruiu wrote:
> > > Ditto
> > What about eliminating them ?
> > ```
> >   for (auto &I : PcToOffset) {
> >     // The first four bytes are an offset to the initial PC value for the FDE.
> >     write32<E>(Buf, I.first - VA);
> >     // The last four bytes are an offset to the FDE data itself.
> >     write32<E>(Buf + 4, EhVA + I.second - VA);
> >     Buf += 8;
> >   }
> > }
> > ```
> LGTM
Nice. Thanks for review ! I'll commit this tomorrow.


http://reviews.llvm.org/D15712





More information about the llvm-commits mailing list