This patch drops the prefix PT_RISCV_ when dumping PT_RISCV_ATTRIBUTES.
GNU readelf dumps it as RISCV_ATTRIBUT. Because GNU readelf uses
something like %-14.14s so only the first 14 bytes are printed.
Differential D128493
[llvm-readobj][RISCV] Support dumping PT_RISCV_ATTRIBUTES StephenFan on Jun 23 2022, 10:27 PM. Authored by
Details This patch drops the prefix PT_RISCV_ when dumping PT_RISCV_ATTRIBUTES. GNU readelf dumps it as RISCV_ATTRIBUT. Because GNU readelf uses
Diff Detail
Event TimelineComment Actions LGTM. Does llvm-objdump need something equivalent? (I don't remember whether we interpret platform-specific program headers in llvm-objdump)
Comment Actions
Support dumping
riscv gnu toolchain's readelf => GNU readelf When describing binutils-gdb behavior, prefer the official binutils-gdb to a downstream repository like riscv-gnu-toolchain.
Because it uses something like %-14.14s so only the first 14 bytes are printed. Many long program header types like PT_AARCH64_MEMTAG_MTE are affected as well.
Actually I am unsure we should drop the machine prefix. GNU readelf uses the prefix and it seems clearer to have the prefix.
Comment Actions ATTRIBUTES may be fine for now since the GNU readelf output isn't ideal RISCV_ATTRIBUT. |
Nit: delete extra blank line.