This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Why relocation truncated to fit: R_MIPS_26 again `memcpy'?
- From: Pan ruochen <panruochen at gmail dot com>
- To: binutils at sourceware dot org
- Date: Mon, 8 Jun 2009 12:50:20 +0800
- Subject: Why relocation truncated to fit: R_MIPS_26 again `memcpy'?
$make
sde-gcc -EL -Os -G0 -mips32r2 -fno-pic -fno-builtin -mno-abicalls -c test.c
sde-ld -EL -T link.lds -o a.elf test.o -R libc.img
test.o: In function `main':
test.c:(.text+0x64): relocation truncated to fit: R_MIPS_26 against `memcpy'
$cat link.lds
OUTPUT_ARCH(mips)
SECTIONS
{
.text 0x80200000 : { *(.text) *(.rodata*) }
.data : { *(.data) *(.sdata) }
.bss : { *(.sbss) *(.scommon) *(.bss) *(COMMON) }
}
$sde-nm libc.img
...
80000808 T memchr
80000728 T memcmp
80000628 T memcpy
...
Since .text section and memcpy are located in the same 256M region,
how the `relocation truncated to fit' linking error comes?
Best Regard,
PRC
June 8, 2009