[PATCH] D82374: [llvm-readelf] - Don't crash when e_shstrndx=SHN_XINDEX, but there is no section header.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 23 11:15:53 PDT 2020
MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.
Thanks!
================
Comment at: llvm/include/llvm/Object/ELF.h:521
+ // If the section name string table section index is greater than or equal
+ // to SHN_LORESERVE, then e_shstrndx field should have the value of
+ // SHN_XINDEX and sh_link of the section header at index 0 is used to store
----------------
Considering using the ELF spec wording:
... the actual index of the section name string table section is contained in the sh_link field of the section header at index 0.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82374/new/
https://reviews.llvm.org/D82374
More information about the llvm-commits
mailing list