This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Change in dwarf2dbg using sizeof_offset

On Tue, Jul 29, 2008 at 12:27:30PM +0200, Kai Tietz wrote:
> Hi,
> has I noticed uses dwarf2dbg.c for TC_DWARF2_EMIT_OFFSET in some places 
> the sizeof 4 bytes instead of sizeof_offset. This is a major problem for 
> the w64 target, because section relative relocation have to be 64-bit 
> wide, and there is no useful 32-bit relocation, which could handle this. I 
> would suggest to change those dw2 types, like DW_AT_stmt_list and the 
> arange to use sizeof_offset instead.
> Is this already a bug, or is this a major change? I saw already comments 
> about this issue in source code, too.

I don't think either of these are bugs, but it is a little strange
that we don't use the 64-bit offsets for 64-bit targets since that
means we can't have a .debug_info section larger than 4G.

Now, if you change the DW_AT_stmt_list TC_DWARF2_EMIT_OFFSET then of
course you need to change out_debug_abbrev to emit the correct DW_FORM
for it.  That change should be painless, I think.

If you change the .debug_aranges TC_DWARF2_EMIT_OFFSET, then you need
to also output a 64-bit dwarf section length (0xffffffff followed by a
64-bit length) for .debug_aranges, to notify consumers that the
section is 64-bit dwarf.  The current 32-bit section length used in
.debug_aranges says that .debug_aranges is always 32-bit dwarf, even
on a 64-bit target.

Does anyone see a reason why we shouldn't make these changes?

Alan Modra
Australia Development Lab, IBM

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]