On Mon, 2014-03-10 at 14:37 -0700, Josh Stone wrote:
On 03/10/2014 02:23 PM, Mark Wielaard wrote:
> On Fri, 2014-03-07 at 17:39 -0800, Josh Stone wrote:
>> Maybe this only needs to add a check that file == &mod->main
>
> Yes, I think that would be the correct thing to do. Both find_dw and
> find_symtab call __libdwfl_getelf first. So the main ELF file will
> always be loaded through open_elf first. After mod->e_type has been set
> it should not be set or changed again by either debug of aux file
> opening.
Ok. I attached my simple patch which still passes the testsuite, and
also fixes my issue -- let me know how it works for you.
Yes, that works for me. I added an extra comment explaining the why and
added an assert to make sure our internal invariant holds. If you don't
mind adding your Signed-off-by line to the attached commit (see also the
CONTRIBUTING file) could you push it to master? Or let me know I should.
Thanks,
Mark