This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Patch/RFA]: Patch to fix R_ARM_THM_JUMP24 relocation truncated bug
- From: Alan Modra <amodra at gmail dot com>
- To: Matthew Gretton-Dann <matthew dot gretton-dann at arm dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 15 Jan 2010 11:04:39 +1030
- Subject: Re: [Patch/RFA]: Patch to fix R_ARM_THM_JUMP24 relocation truncated bug
- References: <1263477671.28149.21.camel@cam-bc3-b12.cambridge.arm.com>
On Thu, Jan 14, 2010 at 02:01:11PM +0000, Matthew Gretton-Dann wrote:
> HOWTO (R_ARM_THM_JUMP24, /* type */
> 1, /* rightshift */
> 2, /* size (0 = byte, 1 = short, 2 = long) */
> - 24, /* bitsize */
> + 25, /* bitsize */
> TRUE, /* pc_relative */
> 0, /* bitpos */
> complain_overflow_signed,/* complain_on_overflow */
This is odd. Normally, bitsize determines the allowed field value
after the rightshift has been applied. Hmm, I see elf32-arm.c does
it's own checking for these relocs and gets it wrong. It would be
better to leave bitsize as 24 and remove the right shift on the
reloc_signed_max calculation. You'd then need to adjust the
R_ARM_THM_JUMP24 howto.
--
Alan Modra
Australia Development Lab, IBM