OSDN Git Service

[llvm-readelf/obj] - Index phdrs and relocations from 0 when reporting warnings.
authorGeorgii Rymar <grimar@accesssoftek.com>
Thu, 24 Dec 2020 13:20:07 +0000 (16:20 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Mon, 11 Jan 2021 12:13:54 +0000 (15:13 +0300)
commita6db7cf1ce7f3523adb132819c1697a572bdcfde
tree22e2aab2df0c9299cf3bc4211ab1a6c41c970e7a
parent8ea72b388734ce660f861e0dfbe53d203e94876a
[llvm-readelf/obj] - Index phdrs and relocations from 0 when reporting warnings.

As was mentioned in comments here:
https://reviews.llvm.org/D92636#inline-864967

we are not consistent and sometimes index things from 0, but sometimes
from 1 in warnings.

This patch fixes 2 places: messages reported for
program headers and messages reported for relocations.

Differential revision: https://reviews.llvm.org/D93805
llvm/test/tools/llvm-readobj/ELF/gnu-notes.test
llvm/test/tools/llvm-readobj/ELF/note-core-ntfile-bad.test
llvm/test/tools/llvm-readobj/ELF/relocation-errors.test
llvm/test/tools/llvm-readobj/ELF/relocations.test
llvm/test/tools/llvm-readobj/ELF/stack-sizes.test
llvm/tools/llvm-readobj/ELFDumper.cpp