This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[MIPS][bfd] Merging mips .reginfo sections
- From: Simon Atanasyan <simon at atanasyan dot com>
- To: binutils at sourceware dot org
- Date: Wed, 1 Apr 2015 08:06:46 +0300
- Subject: [MIPS][bfd] Merging mips .reginfo sections
- Authentication-results: sourceware.org; auth=none
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