[PATCH] D79013: [llvm-readelf] - Do not crash when the PT_INTERP has a broken offset.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 29 09:38:48 PDT 2020


MaskRay accepted this revision.
MaskRay added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/gnu-phdrs.test:326
+
+# ERROR-INTERP:      Type           Offset
+# ERROR-INTERP-NEXT: INTERP         0x000230
----------------
The main problem with the test is that if yaml2obj layout is updated, the p_offset fields will need an update which may be a bit tricky. Since the file size is displayed, this is probably fine.

560 = size(Ehdr) + size(Phdrs) + section contents with padding + size(Shdrs) = 64 + 56*5 + alignTo(1+0x13, 8) + 64*3 = 560


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79013/new/

https://reviews.llvm.org/D79013





More information about the llvm-commits mailing list