[PATCH] D64714: [Object/llvm-readelf/llvm-readobj] - Improve error reporting when e_shstrndx is broken.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 15 05:58:02 PDT 2019


jhenderson added a comment.

In D64714#1585224 <https://reviews.llvm.org/D64714#1585224>, @grimar wrote:

> In D64714#1585186 <https://reviews.llvm.org/D64714#1585186>, @jhenderson wrote:
>
> > I wonder if it would make sense if the file name was included in the error message, at least in the llvm-readobj/llvm-readelf case? In that case, there can be more than one file, or indeed it could be an archive member that is broken, so reporting the file name would make sense.
>
>
> We shouldn't do this in ELF.h probably, since tools are adding it on their side. e.g. in `Invalid.test` I am actually testing the file name printed by obj2yaml.
>  And for example LLD expects that adds a error location (including file names) on it's side too.
>
> Speaking about `llvm-readobj/llvm-readelf`, I do not mind, going to update the code in `ELFDumper.cpp` to add a file name.


Sounds good to me.


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

https://reviews.llvm.org/D64714





More information about the llvm-commits mailing list