[PATCH] D65388: [llvm-readelf/llvm-readobj] - Test the case when e_shstrndx==SHN_XINDEX, but sec[0].sh_link is broken.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 30 07:29:51 PDT 2019


jhenderson added a comment.

In D65388#1606226 <https://reviews.llvm.org/D65388#1606226>, @grimar wrote:

> This duplication was introduced in D63266 <https://reviews.llvm.org/D63266>. The intention was to skip non-critical errors to allow readelf to dump things.
>  I though about this and possible similar situations today too, btw. My idea was to add some kind of error policy for stuff in ELF.h.
>  For example `ERR_MODE_STRICT` which would act as now, reporting everything, and mode `ERR_MODE_DUMP` which dumpers and tools
>  like `obj2yaml` could use (`obj2yaml` can win from relaxing the error checking a lot).
>  I had no chance to investigate this, can take a look closer tomorrow.


Thanks, that sounds like a good plan to explore to me.


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

https://reviews.llvm.org/D65388





More information about the llvm-commits mailing list