PATCH: Support more than 1 comp unit
H. J. Lu
hjl@lucon.org
Wed Jan 12 04:18:00 GMT 2005
On Tue, Jan 11, 2005 at 08:58:45PM -0500, Daniel Jacobowitz wrote:
> On Tue, Jan 11, 2005 at 05:50:43PM -0800, H. J. Lu wrote:
> > _bfd_dwarf2_find_nearest_line doesn't support more than one comp unit.
>
> That's obviously not true. Could you be a little more specific about
> what the problem is that you are trying to solve?
>
dwarf2_debug has
/* Preserve the original value of info_ptr for the current
comp_unit so we can find a given entry by its reference. */
char* info_ptr_unit;
which is used by find_abstract_instance_name:
info_ptr = unit->stash->info_ptr_unit + die_ref;
The problem is there is only one info_ptr_unit per file for multiple
CUs. To work with more than one CU, info_ptr_unit has to be updated
for the current CU when find_abstract_instance_name is called. My
patch adds the CU offset to comp_unit, which can be used by
find_abstract_instance_name to adjust info_ptr_unit.
BTW, I have a testcase of a several MB ia64 libc_pic.os generated by
"ld -r".
H.J.
More information about the Binutils
mailing list