On Wed, 23 Jan 2013 17:48:24 +0100, Mark Wielaard wrote:
> @@ -1077,6 +1085,10 @@ find_symtab (Dwfl_Module *mod)
>        mod->aux_symdata = elf_getdata (aux_symscn, NULL);
>        if (mod->aux_symdata == NULL)
>       goto aux_cleanup;
> +
> +      /* We will skip the auxiliary zero entry if there is another one. */
> +      if (mod->syments > 0 && mod->aux_syments > 0)
> +     mod->aux_syments--;

I have not tried to find a reproducer, if there is any.

But I find it messy a bit,  You adjust AUX_SYMENTS for that initial zero
symbol but you do not adjust AUX_FIRST_GLOBAL for that initial zero symbol.

Therefore AUX_SYMENTS and AUX_FIRST_GLOBAL numbering is off-by-one.

I would prefer to not modify the member variable AUX_SYMENTS and only adjust
it if needed / when read, as you already do with AUX_FIRST_GLOBAL.


TBH FYI / no request here: I no not find this first_global + syments too clear
now when combining multiple symbol tables, which is why I have refactored it in:
        [patch 1/3] ppc64 .opd: Refactor syments/first_global
        
https://lists.fedorahosted.org/pipermail/elfutils-devel/2012-December/002839.html


Regards,
Jan
_______________________________________________
elfutils-devel mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/elfutils-devel

Reply via email to