This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] bfd: allow negative offsets to _GLOBAL_OFFSET_TABLE_ in elf64 SPARC
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Mon, 19 Sep 2016 08:42:34 -0400
- Subject: [binutils-gdb] bfd: allow negative offsets to _GLOBAL_OFFSET_TABLE_ in elf64 SPARC
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT b19753ce31da347605dfa903c6fd2158e2444f0d ***
Author: Jose E. Marchesi <jose.marchesi@oracle.com>
Branch: master
Commit: b19753ce31da347605dfa903c6fd2158e2444f0d
bfd: allow negative offsets to _GLOBAL_OFFSET_TABLE_ in elf64 SPARC
The code compiled with the -fpic model in SPARC uses 13-bit signed
immediate PC-relative loads to fetch entries from the GOT table. In
theory this would allow using a GOT table (.got section) containing up
to 1024 entries in elf32 or 512 entries in elf64.
However, in elf64 sparc GNU targets _GLOBAL_OFFSET_TABLE_ is always
placed at the beginning of the .got section, making it impossible to use
negative offsets. This limits the usage of -fpic to GOT tables
containing a maximum of 257 entries in elf64.
This patch activates an optimization that is already used in sparc-elf32
also in sparc-elf64, that sets _GLOBAL_OFFSET_TABLE_ to point 0x1000
into the .got section if the section size is bigger than 0x1000.
2016-09-19 Jose E. Marchesi <jose.marchesi@oracle.com>
* elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Allow
negative offsets to _GLOBAL_OFFSET_TABLE_ if the .got section is
bigger than 0x1000 bytes.
- Follow-Ups:
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
- Failures on Ubuntu-AArch64-m64, branch master
- Failures on Debian-x86_64-m64, branch master
- Failures on Debian-s390x-native-gdbserver-m64, branch master
- Failures on Fedora-i686, branch master
- Failures on Fedora-x86_64-m32, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Fedora-x86_64-native-gdbserver-m64, branch master
- Failures on Ubuntu-AArch64-native-gdbserver-m64, branch master
- Failures on Debian-s390x-native-extended-gdbserver-m64, branch master
- Failures on Debian-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Debian-i686-native-extended-gdbserver, branch master
- Failures on Fedora-ppc64be-native-gdbserver-m64, branch master
- Failures on Fedora-ppc64be-native-extended-gdbserver-m64, branch master
- Failures on Fedora-ppc64le-native-extended-gdbserver-m64, branch master
- Failures on Fedora-ppc64le-native-gdbserver-m64, branch master