This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH 2/2 v2] Generalize cu_sec_idx
- From: Mark Wielaard <mark at klomp dot org>
- To: Ulf Hermann <ulf dot hermann at qt dot io>, elfutils-devel at sourceware dot org
- Date: Thu, 14 Dec 2017 14:51:31 +0100
- Subject: Re: [PATCH 2/2 v2] Generalize cu_sec_idx
- Authentication-results: sourceware.org; auth=none
- References: <firstname.lastname@example.org>
On Fri, 2017-12-08 at 16:06 +0100, Ulf Hermann wrote:
> Apparently CUs can appear in other sections than IDX_debug_info and
> IDX_types. Rather than relying on the indirect indication provided by
> type_offset we compare the addresses directly to figure out which section
> a given CU belongs to.
This is clever and indeed cu_sec_idx () is not generic enough.
But this is also somewhat inefficient. I am working on DWARF5 support
and there a CU can come from even more different sections (or file). So
I am changing Dwarf_CU to have an explicit section to which is it is
associated. This can then also be used by the "fake" CUs like created