binutils: readelf: when dumping CTF, load strtab and symtab automatically
authorNick Alcock <nick.alcock@oracle.com>
Sat, 13 Jul 2019 18:47:11 +0000 (19:47 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Thu, 3 Oct 2019 16:04:55 +0000 (17:04 +0100)
commit616febde0c661843219b66e08e652e76ce856b8f
treed682ec59d7393fa18c10248503bd7a65bafb69b5
parent2db912ba1a9e1c249cb4795f781fd4ea9fe9e7f2
binutils: readelf: when dumping CTF, load strtab and symtab automatically

We were only loading them when explicitly requested, which leads to
strings that point off into empty space (into the non-loaded "external"
ELF string table).  Avoid this unfortunate consequence by loading the
strtab and symtab by default, unless a blank name is given.

binutils/
* readelf.c (dump_ctf_symtab_name): Give default value.
(dump_ctf_strtab_name): Likewise.
(dump_section_as_ctf): Allow for the null string.
binutils/ChangeLog
binutils/doc/binutils.texi
binutils/readelf.c