This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Adjust relocation type secrel for w64 and fix base-file/dlltool functionality
- From: Kai Tietz <Kai dot Tietz at onevision dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sourceware dot org, NightStrike <nightstrike at gmail dot com>
- Date: Mon, 1 Sep 2008 14:39:45 +0200
- Subject: Re: Adjust relocation type secrel for w64 and fix base-file/dlltool functionality
Hi Nick,
Nick Clifton <nickc@redhat.com> wrote on 26.08.2008 16:48:09:
> Kai - what problem does this patch solve ? How was it tested ? Do you
> have a test case that can be added to the linker or binutils testsuites
?
>
> One thing that concerns me is the changing of the R_AMD64_SECREL reloc.
> Is this an ABI defined reloc ?
The patch was tested for x86_64-pc-mingw32. The secrel issue is, that PE+
has to use DIR64 for relocation and there is not suitable 32-bit ImageBase
relocation present. The R_(I386|AMD64)_SECREL isn't a real coff
relocation. It is mainly used for dwarf2. The problem fixed by this patch
are the base relocations for w64 target for secrel (the second patch I
sent for gas supporting .secrel64 is part necessary, too). dlltool emits
at the moment HIGHLOW relocations, which have to be altered into DIR64
relocations for w64 and the size of the vma's have to be changed to
bfd_vma instead of 'long' stored in the base-file.
Some test in the testsuite needs to be reworked completly for w64 in gas
and ld. But first I wanted to get some response about the patch before
adjusting them.
The most interesting question here is, if it wouldn't be better to alter
the dwarf2 code for mingw in general. The idea was - as I spoke to Aaron
about it - to use instead of .secrel for dwarf2 .rva an use the global
__image_base to relocate the dwarf2 code. So we could get rid of the
necessarity of base relocations in debug section at all and the
implementation would be more near to the unix one.
Cheers,
Kai
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.