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]

CR16 port :: relocation truncated to fit: R_CR16_IMM32


Hi,
 
??? 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.

Testcase:
_________

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"

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.

Thanks,
Sumanth G



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