binutils-gdb/libctf
Nick Alcock 97a2a623d0 libctf, include: add ctf_getsymsect and ctf_getstrsect
libctf has long provided ctf_getdatasect, which hands back a pointer to
the CTF section a (read-only) dict came from.  But it has no such
functions to return pointers to the ELF symbol table or string table
it's working from, which is unfortunate because several libctf functions
(ctf_open, ctf_fdopen, and ctf_bfdopen) figure out which string and
symbol table to use themselves, and don't tell the user what they
decided, so the caller can't agree on which symtab to use with libctf
even if it wanted to.

Add a pair of functions to return the symtab and strtab in use.  Like
ctf_getdatasect, these return ctf_sect_t structures by value, filled
with all-NULL/0 content if a symtab or strtab is not being used.

include/ChangeLog
2020-11-20  Nick Alcock  <nick.alcock@oracle.com>

	* ctf-api.h (ctf_getsymsect): New.
	(ctf_getstrsect): Likewise.

libctf/ChangeLog
2020-11-20  Nick Alcock  <nick.alcock@oracle.com>

	* ctf-open.c (ctf_getsymsect): New.
	(ctf_getstrsect): Likewise.
	* libctf.ver: Add them.
2020-11-20 13:34:12 +00:00
..
.gitignore
aclocal.m4
ChangeLog libctf, include: add ctf_getsymsect and ctf_getstrsect 2020-11-20 13:34:12 +00:00
config.h.in
configure
configure.ac
ctf-archive.c libctf, include: CTF-archive-wide symbol lookup 2020-11-20 13:34:11 +00:00
ctf-create.c libctf: symbol type linking support 2020-11-20 13:34:08 +00:00
ctf-decl.c
ctf-decls.h
ctf-dedup.c libctf, ld: properly deduplicate function types 2020-11-20 13:34:10 +00:00
ctf-dump.c libctf: adjust dumper for symtypetab changes 2020-11-20 13:34:09 +00:00
ctf-endian.h
ctf-error.c
ctf-hash.c libctf: symbol type linking support 2020-11-20 13:34:08 +00:00
ctf-impl.h libctf, include: CTF-archive-wide symbol lookup 2020-11-20 13:34:11 +00:00
ctf-inlines.h
ctf-intl.h
ctf-labels.c
ctf-link.c libctf: symbol type linking support 2020-11-20 13:34:08 +00:00
ctf-lookup.c libctf: symbol type linking support 2020-11-20 13:34:08 +00:00
ctf-open-bfd.c bfd, include, ld, binutils, libctf: CTF should use the dynstr/sym 2020-11-20 13:34:07 +00:00
ctf-open.c libctf, include: add ctf_getsymsect and ctf_getstrsect 2020-11-20 13:34:12 +00:00
ctf-qsort_r.c
ctf-sha1.c
ctf-sha1.h
ctf-string.c libctf: symbol type linking support 2020-11-20 13:34:08 +00:00
ctf-subr.c
ctf-types.c libctf: symbol type linking support 2020-11-20 13:34:08 +00:00
ctf-util.c libctf: symbol type linking support 2020-11-20 13:34:08 +00:00
elf.h
libctf.ver libctf, include: add ctf_getsymsect and ctf_getstrsect 2020-11-20 13:34:12 +00:00
Makefile.am
Makefile.in
swap.h