"relocation truncated to fit: R_MIPS_26 " with gcc 4.1.2 toolchain
Andrew Haley
aph@redhat.com
Wed Oct 8 09:45:00 GMT 2008
dbadhani wrote:
> Hi Gurus,
>
> I upgraded the gcc toolchain to 4.1.2 and started seeing the following
> linker errors :
>
> ------------------
> .
> .
> aaa_main.o: In function `main_loop':
> aaa_main.c:273: relocation truncated to fit: R_MIPS_26 against
> `process_message'
> libaaa.a(aaa_soft.ao): In function `increment_stat':
> stat.c:84: relocation truncated to fit: R_MIPS_26 against
> `increment_aaa_stat'
> .
> .
> --------------------
>
> Here's an excerpt from the disassembly:
> -------------------------------
> Disassembly of section .text:
>
> 00000000 <process_message>:
> 0: 8c830000 lw v1,0(a0
> .
> .
> .
> Disassembly of section .text.hot:
> .
> .
>
> 000000d8 <main_loop>:
> d8: 27bdff60 addiu sp,sp,-160
> dc: ffbc0080 sd gp,128(sp
> -------------------------------
>
> Why is it generating a jump with a 26 bit address (a gap of 64MB)?
See the section "MIPS Options" in the manual, in particular
`-mlong-calls'
> Why is it separating the functions into ".text" and ".text.hot" sections
> even when I've put the object file "aaa_main.o" explicitly in the ".text"
> section in the linker script?
See the docs for `-freorder-functions' in Section 3.10, Options That
Control Optimization.
Andrew.
More information about the Gcc-help
mailing list