This is the mail archive of the binutils@sourceware.org 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 Thu, Jul 31, 2008 at 09:15:20AM +0200, Kai Tietz wrote:
> For w64 I prepared an patch too. It defines the DWARF_OFFSET_SIZE macro 
> for this target to 8. The problem is that for PE there is no way to allow 
> 32-bit relocations, because a dll can be rebased above the 4 GB va (e.g. 
> msvcrt is above the 32-bit boundary by default).
> So w64 have need that all 32-bit offsets, which are not of kind rva, are 
> changed to 64-bit offset.
> The other chance to do this without the need of any load time relocation 
> would be to make dw2 using rva instead of secrel. The dw2 code could use 
> the ld symbol __ImageBase (__image_base) to get the correct va.

Both of the places you want to change in gas/dwarf2dbg.c are
specifying offsets from the start of a particular section, so should
be unaffected by the base address of the object.  If you are treating
them as addresses then you are violating the DWARF standards.

> Well I see, that the space requirment of this patch is in general small, 
> so why should we introduce a target difference here?

I agree that we shouldn't introduce needless differences between what
gcc produces and what gas produces for debug info.  So if you can
convince the gcc maintainers to change gcc then we'll happily change
gas.

> A second question I have, where in objcopy I have to implement, that load 
> time relocation pointing into removed sections are remove, too?

Probably somewhere near the comment "Remove relocations".

-- 
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]