This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: reloc overflows
- To: alan at linuxcare dot com dot au
- Subject: Re: reloc overflows
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 11 Apr 2000 09:19:05 -0700
- CC: binutils at sourceware dot cygnus dot com, hjl at gnu dot org, chris at beezer dot med dot miami dot edu, VANDROVE at vc dot cvut dot cz, kruus at on2 dot com, sama at prosa dot it
- References: <Pine.LNX.4.21.0004112356260.3722-100000@front.linuxcare.com.au>
Date: Wed, 12 Apr 2000 00:14:58 +1000 (EST)
From: Alan Modra <alan@linuxcare.com.au>
> - /* We explicitly permit wrap around if this relocation
> - covers the high bit of an address. The Linux kernel
> - relies on it, and it is the only way to write assembler
> - code which can run when loaded at a location 0x80000000
> - away from the location at which it is linked. */
> - if (howto->bitsize + rightshift
> - == bfd_arch_bits_per_address (input_bfd))
> - break;
Hi Ian,
I goofed in removing this, causing problems such as
http://cgi.debian.org/cgi-bin/bugreport.cgi?bug=61719
Yes, I've found that changes to the relocation checking code are
almost always wrong.
Attached is a fairly simple fix, along with a couple of optimisations for
sign extension.
OK to apply?
Yes. Thanks. Please move this into the 2.10 branch as well.
Ian