This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch]: Fix base-file and relocation for w64
- From: Kai Tietz <Kai dot Tietz at onevision dot com>
- To: Alan Modra <amodra at bigpond dot net dot au>
- Cc: binutils at sourceware dot org, Nick Clifton <nickc at redhat dot com>, NightStrike at gmail dot com
- Date: Thu, 2 Oct 2008 09:33:00 +0200
- Subject: Re: [patch]: Fix base-file and relocation for w64
Hi Alan,
Alan Modra <amodra@bigpond.net.au> wrote on 01.10.2008 17:07:30:
> On Wed, Oct 01, 2008 at 02:09:39PM +0200, Kai Tietz wrote:
> > * cofflink.c (_bfd_coff_generic_relocate_section): Dump
bfd_vma
> > sized addresses instead of long sized.
>
> Suppose I build binutils on a 32-bit host for target i686-pc-cygwin.
> Then I think you'll have a 32-bit bfd_vma. If I build again on the
> same host, but this time enable an additional target which happens to
> be 64-bit, eg. --target=i686-pc-cygwin --enable-targets=x86_64-mingw,
> then bfd_vma is 64-bit. Do you really want to introduce this
> incompatibility?
I agree, that the dump-files won't be compatible anymore, if you use
64-bit vmas. But for 64-bit targets is is necessary to store the complete
vma, because otherwise it could overflow and produce wrong relocation
addresses, too. So I think it is better to introduce this incompatibility
for multi-architectures using 64-bit addresses, than to produce wrong
relocations in dlltool.
Kai Tietz
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.