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. */
static const char *
ctf_lookup_symbol_name (ctf_dict_t *fp, unsigned long symidx)
{
- const ctf_sect_t *sp = &fp->ctf_symtab;
+ const ctf_sect_t *sp = &fp->ctf_ext_symtab;
ctf_link_sym_t sym;
int err;
ctf_lookup_symbol_idx (ctf_dict_t *fp, const char *symname, int try_parent,
int is_function)
{
- const ctf_sect_t *sp = &fp->ctf_symtab;
+ const ctf_sect_t *sp = &fp->ctf_ext_symtab;
ctf_link_sym_t sym;
void *known_idx;
int err;
const char *symname, int try_parent,
int is_function)
{
- const ctf_sect_t *sp = &fp->ctf_symtab;
+ const ctf_sect_t *sp = &fp->ctf_ext_symtab;
ctf_id_t type = 0;
int err = 0;
if (symsect != NULL)
{
- memcpy (&fp->ctf_symtab, symsect, sizeof (ctf_sect_t));
- memcpy (&fp->ctf_strtab, strsect, sizeof (ctf_sect_t));
+ memcpy (&fp->ctf_ext_symtab, symsect, sizeof (ctf_sect_t));
+ memcpy (&fp->ctf_ext_strtab, strsect, sizeof (ctf_sect_t));
}
if (fp->ctf_data.cts_name != NULL)
err = ENOMEM;
goto bad;
}
- if (fp->ctf_symtab.cts_name != NULL)
- if ((fp->ctf_symtab.cts_name = strdup (fp->ctf_symtab.cts_name)) == NULL)
+ if (fp->ctf_ext_symtab.cts_name != NULL)
+ if ((fp->ctf_ext_symtab.cts_name = strdup (fp->ctf_ext_symtab.cts_name)) == NULL)
{
err = ENOMEM;
goto bad;
}
- if (fp->ctf_strtab.cts_name != NULL)
- if ((fp->ctf_strtab.cts_name = strdup (fp->ctf_strtab.cts_name)) == NULL)
+ if (fp->ctf_ext_strtab.cts_name != NULL)
+ if ((fp->ctf_ext_strtab.cts_name = strdup (fp->ctf_ext_strtab.cts_name)) == NULL)
{
err = ENOMEM;
goto bad;
if (fp->ctf_data.cts_name == NULL)
fp->ctf_data.cts_name = _CTF_NULLSTR;
- if (fp->ctf_symtab.cts_name == NULL)
- fp->ctf_symtab.cts_name = _CTF_NULLSTR;
- if (fp->ctf_strtab.cts_name == NULL)
- fp->ctf_strtab.cts_name = _CTF_NULLSTR;
+ if (fp->ctf_ext_symtab.cts_name == NULL)
+ fp->ctf_ext_symtab.cts_name = _CTF_NULLSTR;
+ if (fp->ctf_ext_strtab.cts_name == NULL)
+ fp->ctf_ext_strtab.cts_name = _CTF_NULLSTR;
if (strsect != NULL)
{
if (fp->ctf_data.cts_name != _CTF_NULLSTR)
free ((char *) fp->ctf_data.cts_name);
- if (fp->ctf_symtab.cts_name != _CTF_NULLSTR)
- free ((char *) fp->ctf_symtab.cts_name);
+ if (fp->ctf_ext_symtab.cts_name != _CTF_NULLSTR)
+ free ((char *) fp->ctf_ext_symtab.cts_name);
- if (fp->ctf_strtab.cts_name != _CTF_NULLSTR)
- free ((char *) fp->ctf_strtab.cts_name);
+ if (fp->ctf_ext_strtab.cts_name != _CTF_NULLSTR)
+ free ((char *) fp->ctf_ext_strtab.cts_name);
else if (fp->ctf_data_mmapped)
ctf_munmap (fp->ctf_data_mmapped, fp->ctf_data_mmapped_len);
ctf_sect_t
ctf_getsymsect (const ctf_dict_t *fp)
{
- return fp->ctf_symtab;
+ return fp->ctf_ext_symtab;
}
ctf_sect_t
ctf_getstrsect (const ctf_dict_t *fp)
{
- return fp->ctf_strtab;
+ return fp->ctf_ext_strtab;
}
/* Set the endianness of the symbol table attached to FP. */
our idea of the endianness has changed. */
if (old_endianness != fp->ctf_symsect_little_endian
- && fp->ctf_sxlate != NULL && fp->ctf_symtab.cts_data != NULL)
- assert (init_symtab (fp, fp->ctf_header, &fp->ctf_symtab) == 0);
+ && fp->ctf_sxlate != NULL && fp->ctf_ext_symtab.cts_data != NULL)
+ assert (init_symtab (fp, fp->ctf_header, &fp->ctf_ext_symtab) == 0);
}
/* Return the CTF handle for the parent CTF dict, if one exists. Otherwise