Summary: | readelf -V output is inconsistent | ||
---|---|---|---|
Product: | binutils | Reporter: | Fangrui Song <i> |
Component: | binutils | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nickc |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Fangrui Song
2019-05-29 13:14:47 UTC
Sorry, in .gnu.version_d, `Addr:` is indented by 2. The master branch has been updated by Nick Clifton <nickc@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ae9ac79e5e291a2bc5c6620a10c37a3558d55d36 commit ae9ac79e5e291a2bc5c6620a10c37a3558d55d36 Author: Nick Clifton <nickc@redhat.com> Date: Thu May 30 10:17:29 2019 +0100 Harmonize readelf's output for version sections. PR 24627 binutils * readelf.c (process_version_sections): Add 0x prefix to address display. Correct indentation. ld * testsuite/ld-elf/ver_def.vd: Update expected output. Hi Fanguri, I would not call the output "ugly", rather I think that "inconsistent" would be a better word. Nevertheless I have applied a patch so that "Addr" is only intended by one space for three types of output, and that the address always receives a 0x prefix. The fact that a zero value does not receive a 0x prefix when displaying offsets into the section is an artefact of the printf function's '#' formatting character and not something that we can control directly. (Well other than abandoning the use of the # formatter). So I have not changed this. Cheers Nick Thank you for your prompt fix! One remaining issue (after ae9ac79e5e291a2bc5c6620a10c37a3558d55d36). Does `000000: Rev: 1` below need a similar %# fix? Version definition section '.gnu.version_d' contains 26 entries: Addr: 0x0000000000017bc8 Offset: 0x017bc8 Link: 5 (.dynstr) 000000: Rev: 1 Flags: BASE Index: 1 Cnt: 1 Name: libc.so.6 0x001c: Rev: 1 Flags: none Index: 2 Cnt: 1 Name: GLIBC_2.2.5 0x0038: Rev: 1 Flags: none Index: 3 Cnt: 2 Name: GLIBC_2.2.6 |