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: [Patch/RFA]: Patch to fix R_ARM_THM_JUMP24 relocation truncated bug


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]