Reference to .debug_loc

Michal Ludvig mludvig@suse.cz
Mon Feb 17 16:27:00 GMT 2003


Daniel Jacobowitz wrote:
> On Fri, Feb 14, 2003 at 09:35:21PM +0100, Jakub Jelinek wrote:
> 
>>On Fri, Feb 14, 2003 at 02:51:24PM -0500, Daniel Jacobowitz wrote:
>>
>>>>>>Or is there another way?
>>>>>
>>>>>At a guess it should be like DW_AT_ranges:
>>>>>       .long   .Ldebug_ranges0+0x0     # DW_AT_ranges
>>>>>
>>>>>I.E. dw2_asm_output_offset, rather than dw2_asm_output_delta, in GCC.
>>>>>
>>>>
>>>>It's supposed to be the offset from the beginning of the debug_loc 
>>>>section.
>>>>Will this do that?
>>>
>>>I think so.  The result will be something like .Ldebug_ranges0 +
>>>(.LLST0-.Ldebug_loc0).  If the assembler won't take that then we'll
>>>have to track addresses for loclists the same as we do for rangelists.
>>
>>Why simple .long .LLST0 is not sufficient (@secrel(.LLST0) on IA-64)?
>>It is not the only place where gcc relies on VMA of debugging sections
>>to be 0 if the architecture lacks section relative relocations.
> 
> I suppose that would work.  Do you know why DW_AT_ranges is done the
> way it is?

Why?

Michal Ludvig
-- 
* SuSE CR, s.r.o     * mludvig@suse.cz
* (+420) 296.545.373 * http://www.suse.cz



More information about the Gcc mailing list