[MIPS][bfd] Merging mips .reginfo sections

Simon Atanasyan simon@atanasyan.com
Wed Apr 1 05:06:00 GMT 2015


Hi,

It looks like the ld.bfd linker does not merge .reginfo sections from
input object files and just writes registers masks
(ri_gprmask/ri_cprmask) taken from the first object file.

$ objdump -s -j.reginfo 1.o
Contents of section .reginfo:
 0000 04000000 00000000 00000000 00000000

$ objdump -s -j.reginfo 2.o
Contents of section .reginfo:
 0000 02000000 00000000 00000000 00000000

$ ld.bfd -m elf32ltsmip -shared 1.o 2.o
$ objdump -s -j.reginfo a.out
Contents of section .reginfo:
 00d4 04000000 00000000 00000000 00000000

$ ld.bfd -m elf32ltsmip -shared 2.o 1.o
$ objdump -s -j.reginfo a.out
Contents of section .reginfo:
 00d4 08000000 00000000 00000000 00000000

$ ld.bfd -version
GNU ld (GNU Binutils) 2.25.51.20150318

Could anybody explain why the ld.bfd uses this approach and takes
ri_gprmask from the first object file and ignores other .reginfo
sectons?

Regards,
Simon Atanasyan



More information about the Binutils mailing list