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

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 12 05:37:45 PST 2016


ruiu added inline comments.

================
Comment at: ELF/OutputSections.cpp:764
@@ +763,3 @@
+                              SHF_ALLOC) {
+  // It`s a 4 bytes of header + pointer to the contents of the .eh_frame section
+  // + the number of FDE pointers in the table.
----------------
I meant please use apostrophe (') instead of backquote (`) for contractions.

================
Comment at: ELF/OutputSections.cpp:1073
@@ +1072,3 @@
+template <class ELFT>
+bool EHOutputSection<ELFT>::readCieInfo(Cie<ELFT> &Cie, ArrayRef<uint8_t> D) {
+  uint8_t Version;
----------------
This function reads only encoding, right? Then maybe we should change this function signature to

  ErrorOr<uint8_t> getFdeEncoding(ArrayRef<uint8_t> D)

?

Also I'm wondering if corrupted CIEs/FDEs are so prevalent that we have to take care of them. For now, I'd like to simply use error() whenever we find something wrong. Then we can change the signature to

  uint8_t getFdeEncoding(ArrayRef<uint8_t> D)

which is pretty simple to understand.


http://reviews.llvm.org/D15712





More information about the llvm-commits mailing list