[PATCH 2/5] Make IDX_debug_types come last. In a subsequent patch we will put all .debug_types sections at the end the of the section array. This change arranges for them to appear sequentially.

Mark Wielaard mjw at redhat.com
Wed Mar 21 13:23:30 UTC 2012


On Tue, 2012-03-20 at 14:20 -0700, Roland McGrath wrote:
> All in all, this looks to me like a half-measure to handle just one
> particular case you've encountered.  That case is part of a large class of
> general ET_REL cases that we decided long ago libdw had no reason to try to
> handle.  Either we should handle the full generality of ET_REL files
> thoroughly--a lot of work that I'm quite doubtful is worthwhile--or we
> should stick to the existing decision that we handle ET_REL files only for
> the very special case of Linux .ko files (in which the DWARF info looks
> much more like the output of a final link for most purposes).

I admit that I had to look up section groups and COMDATs again, so
please yell and scream if I messed up the details. But isn't this
special .ko case easy to spot? When the dwarf_begin_elf is called
without scngrp (aka in global mode) then only pick up .debug_types from
section groups that have the GRP_COMDAT set and contain only one
section, the .debug_type (and the cross check would be that the
signature is referenced by a "global" .debug_info section CU).

Cheers,

Mark


More information about the elfutils-devel mailing list