aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2024-01-05 12:17:27 +0000
committerNick Alcock <nick.alcock@oracle.com>2024-04-19 16:14:46 +0100
commit629acbe4a32fc2a53e448ce2c704e788f9fbad9f (patch)
tree85b681b7c761b5b04addeef2a4b2a37283d91cb8 /libctf/ctf-impl.h
parentlibctf: fix a comment typo (diff)
downloadbinutils-gdb-629acbe4a32fc2a53e448ce2c704e788f9fbad9f.tar.gz
binutils-gdb-629acbe4a32fc2a53e448ce2c704e788f9fbad9f.tar.bz2
binutils-gdb-629acbe4a32fc2a53e448ce2c704e788f9fbad9f.zip
libctf: rename ctf_dict.ctf_{symtab,strtab}
These two fields are constantly confusing because CTF dicts contain both a symtypetab and strtab, but these fields are not that: they are the symtab and strtab from the ELF file. We have enough string tables now (internal, external, synthetic external, dynamic) that we need to at least name them better than this to avoid getting totally confused. Rename them to ctf_ext_symtab and ctf_ext_strtab. libctf/ * ctf-dump.c (ctf_dump_objts): Rename ctf_symtab -> ctf_ext_symtab. * ctf-impl.h (struct ctf_dict.ctf_symtab): Rename to... (struct ctf_dict.ctf_ext_strtab): ... this. (struct ctf_dict.ctf_strtab): Rename to... (struct ctf_dict.ctf_ext_strtab): ... this. * ctf-lookup.c (ctf_lookup_symbol_name): Adapt. (ctf_lookup_symbol_idx): Adapt. (ctf_lookup_by_sym_or_name): Adapt. * ctf-open.c (ctf_bufopen_internal): Adapt. (ctf_dict_close): Adapt. (ctf_getsymsect): Adapt. (ctf_getstrsect): Adapt. (ctf_symsect_endianness): Adapt.
Diffstat (limited to 'libctf/ctf-impl.h')
-rw-r--r--libctf/ctf-impl.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libctf/ctf-impl.h b/libctf/ctf-impl.h
index b7123317c98..8ce489a55ba 100644
--- a/libctf/ctf-impl.h
+++ b/libctf/ctf-impl.h
@@ -366,9 +366,9 @@ struct ctf_dict
struct ctf_header *ctf_header; /* The header from this CTF dict. */
unsigned char ctf_openflags; /* Flags the dict had when opened. */
ctf_sect_t ctf_data; /* CTF data from object file. */
- ctf_sect_t ctf_symtab; /* Symbol table from object file. */
- ctf_sect_t ctf_strtab; /* String table from object file. */
- int ctf_symsect_little_endian; /* Endianness of the ctf_symtab. */
+ ctf_sect_t ctf_ext_symtab; /* Symbol table from object file. */
+ ctf_sect_t ctf_ext_strtab; /* String table from object file. */
+ int ctf_symsect_little_endian; /* Endianness of the ctf_ext_symtab. */
ctf_dynhash_t *ctf_symhash_func; /* (partial) hash, symsect name -> idx. */
ctf_dynhash_t *ctf_symhash_objt; /* ditto, for object symbols. */
size_t ctf_symhash_latest; /* Amount of symsect scanned so far. */