diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2019-07-13 21:47:30 +0100 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2019-10-03 17:04:55 +0100 |
commit | 22ccb8495447fa2ea31b1f1dea7e94eecf97475d (patch) | |
tree | 06f9f4cb797543f75c479e20614634422e20d351 /ChangeLog | |
parent | f046147d59aab0c8b6f00cd182f34b42ac8915e8 (diff) | |
download | gdb-22ccb8495447fa2ea31b1f1dea7e94eecf97475d.zip gdb-22ccb8495447fa2ea31b1f1dea7e94eecf97475d.tar.gz gdb-22ccb8495447fa2ea31b1f1dea7e94eecf97475d.tar.bz2 |
bfd: new functions for getting strings out of a strtab
The CTF linking process wants to deduplicate the CTF strtab against the
ELF strtab, for which it needs to know the number of strings in the
strtab and it needs to be able to extract them one by one.
The BFD strtab functions only support returning the
size-or-section-length of the strtab (with _bfd_elf_strtab_size)
and returning the offset (but not string!) and decrementing the refcount
at the same time.
So add new functions _bfd_elf_strtab_len (that just returns the length
in strings of the strtab, never the section size) and bfd_elf_strtab_str
(which returns the string at a given strtab index, and its offset,
without touching the refcount).
It is probably a mistake to use _bfd_elf_strtab_str in particular before
_bfd_elf_strtab_finalize is called, and will not produce useful output
if you do so.
v5: fix tabdamage.
bfd/
* elf-strtab.c (_bfd_elf_strtab_len): New.
(_bfd_elf_strtab_str): Likewise.
* bfd-elf.h: Declare them.
Diffstat (limited to 'ChangeLog')
0 files changed, 0 insertions, 0 deletions