readelf: print 0x0 as 0, and remove trailing spaces
authorAlan Modra <amodra@gmail.com>
Fri, 12 Aug 2022 08:18:00 +0000 (17:48 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 13 Aug 2022 04:41:27 +0000 (14:11 +0930)
commitcc44342012efbc20421fa91abd1f0c3000a2241a
treebd2481e9e2386e5b439ff2157d7aa36967d81a28
parent31e5a3a3807e7d5b43845d0d17ddfd1a8692752c
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.
77 files changed:
binutils/dwarf.c
binutils/testsuite/binutils-all/dw2-1.W
binutils/testsuite/binutils-all/dw2-3.W
binutils/testsuite/binutils-all/dw2-3gabi.W
binutils/testsuite/binutils-all/dw2-ranges.W
binutils/testsuite/binutils-all/dw5-op.W
binutils/testsuite/binutils-all/dw5.W
binutils/testsuite/binutils-all/dwarf-attributes.W
binutils/testsuite/binutils-all/i386/compressed-1a.d
binutils/testsuite/binutils-all/libdw2-compressedgabi.out
binutils/testsuite/binutils-all/objdump.W
binutils/testsuite/binutils-all/objdump.WK2
binutils/testsuite/binutils-all/pr26112.r
binutils/testsuite/binutils-all/pr26160.r
binutils/testsuite/binutils-all/readelf.h
binutils/testsuite/binutils-all/readelf.h.thin
binutils/testsuite/binutils-all/readelf.wKis
binutils/testsuite/binutils-all/readelf.wa
binutils/testsuite/binutils-all/testranges-ia64.d
binutils/testsuite/binutils-all/testranges.d
binutils/testsuite/binutils-all/x86-64/compressed-1a.d
binutils/testsuite/binutils-all/x86-64/pr26808.dump
gas/testsuite/gas/aarch64/dwarf.d
gas/testsuite/gas/cris/rd-dw2-1.d
gas/testsuite/gas/cris/rd-dw2-10.d
gas/testsuite/gas/cris/rd-dw2-11.d
gas/testsuite/gas/cris/rd-dw2-12.d
gas/testsuite/gas/cris/rd-dw2-13.d
gas/testsuite/gas/cris/rd-dw2-14.d
gas/testsuite/gas/cris/rd-dw2-15.d
gas/testsuite/gas/cris/rd-dw2-3.d
gas/testsuite/gas/cris/rd-dw2-4.d
gas/testsuite/gas/cris/rd-dw2-5.d
gas/testsuite/gas/cris/rd-dw2-6.d
gas/testsuite/gas/cris/rd-dw2-7.d
gas/testsuite/gas/cris/rd-dw2-8.d
gas/testsuite/gas/cris/rd-dw2-9.d
gas/testsuite/gas/elf/dwarf-3-func.d
gas/testsuite/gas/elf/dwarf-4-cu.d
gas/testsuite/gas/elf/dwarf-5-cu.d
gas/testsuite/gas/elf/dwarf-5-dir0.d
gas/testsuite/gas/elf/dwarf-5-file0.d
gas/testsuite/gas/elf/dwarf-5-func-global.d
gas/testsuite/gas/elf/dwarf-5-func-local.d
gas/testsuite/gas/elf/dwarf-5-func.d
gas/testsuite/gas/elf/dwarf2-1.d
gas/testsuite/gas/elf/dwarf2-2.d
gas/testsuite/gas/elf/dwarf2-20.d
gas/testsuite/gas/elf/dwarf2-3.d
gas/testsuite/gas/elf/dwarf2-5.d
gas/testsuite/gas/elf/dwarf2-6.d
gas/testsuite/gas/i386/debug1.d
gas/testsuite/gas/i386/dw2-compress-1.d
gas/testsuite/gas/i386/dw2-compress-3a.d
gas/testsuite/gas/i386/dw2-compress-3b.d
gas/testsuite/gas/i386/dw2-compressed-1.d
gas/testsuite/gas/i386/dw2-compressed-3a.d
gas/testsuite/gas/i386/dw2-compressed-3b.d
gas/testsuite/gas/i386/dwarf2-line-1.d
gas/testsuite/gas/i386/dwarf2-line-2.d
gas/testsuite/gas/i386/dwarf2-line-4.d
gas/testsuite/gas/i386/dwarf4-line-1.d
gas/testsuite/gas/i386/dwarf5-line-1.d
gas/testsuite/gas/i386/dwarf5-line-2.d
gas/testsuite/gas/i386/dwarf5-line-3.d
gas/testsuite/gas/i386/dwarf5-line-4.d
gas/testsuite/gas/ia64/pr13167.d
gas/testsuite/gas/lns/lns-big-delta.d
gas/testsuite/gas/mips/loc-swap-2.d
gas/testsuite/gas/mips/loc-swap-3.d
gas/testsuite/gas/mips/loc-swap.d
gas/testsuite/gas/mips/micromips@loc-swap-2.d
gas/testsuite/gas/mips/micromips@loc-swap.d
gas/testsuite/gas/mips/mips16@loc-swap-2.d
gas/testsuite/gas/mips/mips16@loc-swap.d
gas/testsuite/gas/mips/mips16e@loc-swap.d
ld/testsuite/ld-arm/cmse_main_sec_debug.d