Help about calculation of addend for ELF relocations for MIPS arch
Ian Lance Taylor
iant@google.com
Wed Aug 13 07:49:00 GMT 2008
"Pan ruochen" <panruochen@gmail.com> writes:
> $cat foo.lds
> OUTPUT_ARCH(mips)
> ENTRY(Init)
> SECTIONS
> {
> .text 0xc0000000 :
> { *(.text) *(.rodata*) }
> .data : { *(.data) }
> .bss : { *(.sbss) *(.scommon) *(.bss) *(COMMON) }
> }
>
> I invoke the following command to create foo.out
> $mips-elf-ld -EL -n -r -T foo.lds -o foo.out $(OBJS)
That seems fairly unusual, and I wouldn't be shocked if there is some
bug when doing it.
Looking at bfd/elfxx-mips.c, the GNU linker seems to assume that all
sections in an object file have a zero VMA. That may well be a bug.
Ian
More information about the Binutils
mailing list