[PATCH] D85623: [llvm-objdump] Change a PLT decoding error to a warning
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 10 17:29:46 PDT 2020
MaskRay added inline comments.
================
Comment at: llvm/test/tools/llvm-objdump/ELF/AArch64/plt.test:41
- Offset: 0x0000000000230018
- Symbol: f1
+ Symbol: [[SYM=<none>]]
Type: R_AARCH64_JUMP_SLOT
----------------
grimar wrote:
> I'd do:
>
> `[[SYM=f1]]`
>
> I.e. then we have a valid YAML input by default and break it with `-D SYM=0` for a particular test.
>
> Otherwise, with `[[SYM=<none>]]` the input is initially broken, what prevents the possible futher extensions
> (e.g. testing the second symbol) for this test without fixing values back to normal ones in each following
> yaml2obj invocation.
>
>
Thanks. Did not know `Symbol: 0` works..
================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:1408
+ " references an invalid symbol",
+ Obj->getFileName());
+ }
----------------
grimar wrote:
> Will it be better not to consume the error and to report something like:
> "warning: unable to read the name of a symbol for PLT entry at ....: <error message with the reason>"?
The message is completely bogus (snowball effect after a decoding error): `st_name (0x326600) is past the end of the string tab
le of size 0x7`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85623/new/
https://reviews.llvm.org/D85623
More information about the llvm-commits
mailing list