readelf: print 0x0 as 0, and remove trailing spaces

This changes readelf output a little, removing the 0x prefix on hex
output when the value is 0, except in cases where a fixed field
width is shown.  %#010x is not a good replacement for 0x%08x.
This commit is contained in:
Alan Modra
2022-08-12 17:48:00 +09:30
parent 31e5a3a380
commit cc44342012
77 changed files with 454 additions and 455 deletions

View File

@@ -1,10 +1,10 @@
Contents of the .debug_info section:
Compilation Unit @ offset 0x0:
Compilation Unit @ offset (0x)?0:
Length: 0x40 \(32-bit\)
Version: 5
Unit Type: DW_UT_compile \(1\)
Abbrev Offset: 0x0
Abbrev Offset: (0x)?0
Pointer Size: 4
<0><c>: Abbrev Number: 1 \(User TAG value: 0x5555\)
<d> DW_AT_ordering : 1 \(column major\)