mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
48e63b8753
Regtested on s390x-redhat-linux. Rewriting l(g)rl @GOTENT to larl is unnecessarily guarded by bfd_link_pic(). There were no use cases for this in the past, but since recently the Linux Kernel on s390x is compiled with -fPIE and linked with --no-pie. Remove the unnecessary bfd_link_pic() check. bfd/ChangeLog: * elf32-s390.c (elf_s390_relocate_section): Don't check for bfd_link_pic() when rewriting lrl@GOTENT to larl. (elf_s390_finish_dynamic_symbol): Emit a relative reloc for the above case. * elf64-s390.c (elf_s390_relocate_section): Don't check for bfd_link_pic() when rewriting lgrl@GOTENT to larl. (elf_s390_finish_dynamic_symbol): Emit a relative reloc for the above case. ld/ChangeLog: * testsuite/ld-s390/s390.exp: Hook up the new tests. * testsuite/ld-s390/gotreloc_31-no-pie-1.dd: New test. * testsuite/ld-s390/gotreloc_64-no-pie-1.dd: New test.
13 lines
495 B
Plaintext
13 lines
495 B
Plaintext
tmpdir/gotreloc_64-1: file format elf64-s390
|
|
|
|
Disassembly of section .text:
|
|
|
|
.* <foo>:
|
|
.*: c0 10 00 00 08 2c [ ]*larl %r1,1001108 <bar>
|
|
.*: c0 10 00 00 08 29 [ ]*larl %r1,1001108 <bar>
|
|
.*: c4 1d 00 00 08 22 [ ]*lrl %r1,1001100 <_GLOBAL_OFFSET_TABLE_\+0x28>
|
|
.*: 58 10 c0 28 [ ]*l %r1,40\(%r12\)
|
|
.*: e3 10 c0 28 00 58 [ ]*ly %r1,40\(%r12\)
|
|
.*: c4 18 00 00 08 16 [ ]*lgrl %r1,10010f8 <_GLOBAL_OFFSET_TABLE_\+0x20>
|
|
.*: c4 18 00 00 08 0f [ ]*lgrl %r1,10010f0 <_GLOBAL_OFFSET_TABLE_\+0x18>
|