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: Tracing Android NDK's R_ARM_THM_CALL Truncate Problem


Hi Will,
> 
> Do you know what is the largest value that works for you? For example
> could you try 4140000?
That's pretty misleading. The place needed to modify is the structure:
  HOWTO (R_ARM_THM_CALL,	/* type */
	 1,			/* rightshift */
	 2,			/* size (0 = byte, 1 = short, 2 = long) */
	 24,			/* bitsize */
	 TRUE,			/* pc_relative */
	 0,			/* bitpos */
	 complain_overflow_signed,/* complain_on_overflow */
	 bfd_elf_generic_reloc,	/* special_function */
	 "R_ARM_THM_CALL",	/* name */
	 FALSE,			/* partial_inplace */
	 0x07ff2fff,		/* src_mask */
	 0x07ff2fff,		/* dst_mask */
	 TRUE),			/* pcrel_offset */

bitsize field.
I have change it to 25 to make thing works.And This is the idea of
gold,check my previous mail please.And according to the manual here:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0204ic/Cihfddaf.html
that 16-bit thumb bl/blx instructions can jump 4MB(aka 23 bitsize
field), that means the 25 makes sense(23 + 2 ,according to the code). 

--
Regards
lin zuojian


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