aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-archive.c
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2019-07-08 13:59:15 +0100
committerNick Alcock <nick.alcock@oracle.com>2019-09-23 14:12:54 +0100
commitbf365a6eb8017153912171ded6367d660d70088f (patch)
treeb39a6aa2b0e895178d974ea4b98876af19013b4a /libctf/ctf-archive.c
parent5fc9eafcae31a01a6d63632c41be1566f74e782d (diff)
downloadbinutils-bf365a6eb8017153912171ded6367d660d70088f.zip
binutils-bf365a6eb8017153912171ded6367d660d70088f.tar.gz
binutils-bf365a6eb8017153912171ded6367d660d70088f.tar.bz2
libctf, binutils: dump the CTF header
The CTF header has before now been thrown away too soon to be dumped using the ctf_dump() machinery used by objdump and readelf: instead, a kludge involving debugging-priority dumps of the header offsets on every open was used. Replace this with proper first-class dumping machinery just like everything else in the CTF file, and have objdump and readelf use it. (The dumper already had an enum value in ctf_sect_names_t for this purpose, waiting to be used.) libctf/ * ctf-impl.h (ctf_file_t): New field ctf_openflags. * ctf-open.c (ctf_bufopen): Set it. No longer dump header offsets. * ctf-dump.c (dump_header): New function, dump the CTF header. (ctf_dump): Call it. (ctf_dump_header_strfield): New function. (ctf_dump_header_sectfield): Likewise. binutils/ * objdump.c (dump_ctf_archive_member): Dump the CTF header. * readelf.c (dump_section_as_ctf): Likewise.
Diffstat (limited to 'libctf/ctf-archive.c')
0 files changed, 0 insertions, 0 deletions