diff options
Diffstat (limited to 'libctf')
-rw-r--r-- | libctf/ChangeLog | 8 | ||||
-rw-r--r-- | libctf/ctf-create.c | 16 | ||||
-rw-r--r-- | libctf/ctf-link.c | 3 |
3 files changed, 20 insertions, 7 deletions
diff --git a/libctf/ChangeLog b/libctf/ChangeLog index 8fa98c6..f095c3e 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,5 +1,13 @@ 2021-03-02 Nick Alcock <nick.alcock@oracle.com> + * ctf-create.c (symtypetab_density): Report the symbol name as + well as index in the name != object error; note the likely + consequences. + * ctf-link.c (ctf_link_shuffle_syms): Report the symbol index + as well as name. + +2021-03-02 Nick Alcock <nick.alcock@oracle.com> + * ctf-link.c (ctf_link_shuffle_syms): Free ctf_dynsyms properly. 2021-03-02 Nick Alcock <nick.alcock@oracle.com> diff --git a/libctf/ctf-create.c b/libctf/ctf-create.c index d417922..3f2c5da 100644 --- a/libctf/ctf-create.c +++ b/libctf/ctf-create.c @@ -318,18 +318,22 @@ symtypetab_density (ctf_dict_t *fp, ctf_dict_t *symfp, ctf_dynhash_t *symhash, if ((flags & CTF_SYMTYPETAB_EMIT_FUNCTION) && sym->st_type != STT_FUNC) { - ctf_err_warn (fp, 1, 0, _("Symbol %x added to CTF as a function " - "but is of type %x\n"), - sym->st_symidx, sym->st_type); + ctf_err_warn (fp, 1, 0, _("symbol %s (%x) added to CTF as a " + "function but is of type %x. " + "The symbol type lookup tables " + "are probably corrupted"), + sym->st_name, sym->st_symidx, sym->st_type); ctf_dynhash_remove (symhash, name); continue; } else if (!(flags & CTF_SYMTYPETAB_EMIT_FUNCTION) && sym->st_type != STT_OBJECT) { - ctf_err_warn (fp, 1, 0, _("Symbol %x added to CTF as a data " - "object but is of type %x\n"), - sym->st_symidx, sym->st_type); + ctf_err_warn (fp, 1, 0, _("symbol %s (%x) added to CTF as a " + "data object but is of type %x. " + "The symbol type lookup tables " + "are probably corrupted"), + sym->st_name, sym->st_symidx, sym->st_type); ctf_dynhash_remove (symhash, name); continue; } diff --git a/libctf/ctf-link.c b/libctf/ctf-link.c index 882d429..5471fcc 100644 --- a/libctf/ctf-link.c +++ b/libctf/ctf-link.c @@ -1552,7 +1552,8 @@ ctf_link_shuffle_syms (ctf_dict_t *fp) for skippability here. */ if (!ctf_symtab_skippable (&did->cid_sym)) { - ctf_dprintf ("symbol name from linker: %s\n", did->cid_sym.st_name); + ctf_dprintf ("symbol from linker: %s (%x)\n", did->cid_sym.st_name, + did->cid_sym.st_symidx); if ((new_sym = malloc (sizeof (ctf_link_sym_t))) == NULL) goto local_oom; |