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]

Re: Help about calculation of addend for ELF relocations for MIPS arch


"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


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