This is the mail archive of the
mailing list for the binutils project.
CR16 port :: relocation truncated to fit: R_CR16_IMM32
- From: Sumanth Gundapaneni <Sumanth dot Gundapaneni at kpitcummins dot com>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>, "Reddy, MR Swami" <MR dot Swami dot Reddy at nsc dot com>
- Cc: "Jayant R. Sonar" <Jayant dot Sonar at kpitcummins dot com>
- Date: Wed, 15 Jun 2011 11:11:12 +0530
- Subject: CR16 port :: relocation truncated to fit: R_CR16_IMM32
??? 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)
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"
I have verified the behavior with binutils-2.18.50 and it links without
emitting any errors. I observed the errors with relocation R_CR16_IMM32
in binutils-2.20.51. Is this the intended behavior?
I have tried to explore bfd_reloc_overflow function but I didn't find
enough clues to resolve the issue.
Your help in this regard would be ?highly appreciated.