This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Tracing Android NDK's R_ARM_THM_CALL Truncate Problem
- From: lin zuojian <manjian2006 at gmail dot com>
- To: Will Newton <will dot newton at linaro dot org>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Fri, 28 Mar 2014 19:49:34 +0800
- Subject: Re: Tracing Android NDK's R_ARM_THM_CALL Truncate Problem
- Authentication-results: sourceware.org; auth=none
- References: <20140328094929 dot GA3768 at ubuntu> <CANu=Dmic6dcw+vxFL_y=EsuKkoGrDfKoje39bw6Pi4YJnAcXYg at mail dot gmail dot com>
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