This is the mail archive of the
mailing list for the binutils project.
Re: CR16 port :: relocation truncated to fit: R_CR16_IMM32
- From: Richard Henderson <rth at redhat dot com>
- To: Sumanth Gundapaneni <Sumanth dot Gundapaneni at kpitcummins dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>, "Reddy, MR Swami" <MR dot Swami dot Reddy at nsc dot com>, "Jayant R. Sonar" <Jayant dot Sonar at kpitcummins dot com>
- Date: Wed, 15 Jun 2011 07:59:18 -0700
- Subject: Re: CR16 port :: relocation truncated to fit: R_CR16_IMM32
- References: <371569CBCFB2E745B891DBB88B2DFDDD1A26CA15C5@KCINPUNHJCMS01.kpit.com>
On 06/14/2011 10:41 PM, Sumanth Gundapaneni wrote:
> I have been working on CR16 gcc backend port for some time.
> I have tested the compiler against various test suites. However,
> a particular test case helps me in cornering an issue with
> binutils-2.20.51 I believe.
> Please find the test case below.
> I used "PROVIDE(__my_sym_ = 0x8fffffff);" in linker script to assign
> the address to symbol.
> push $2, r12, ra
> movd $__my_sym_, (r1,r0)
> loadd [r12]0(r1,r0), (r12)
> push ra
> The symbol value of "__my_sym_" greater than 0x7fff ffff leads to
> "relocation truncated to fit: R_CR16_IMM32 against symbol
> `__my_sym_' defined in *ABS* section in a.out"
Change the description of R_CR16_IMM32 to use
complain_overflow_unsigned instead of a signed overflow.