mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 04:00:07 +08:00
ld/x86-64: Add PR gold/26939 tests
GOTPCRELX relocations can be transformed only when addend == -4. Add tests for GOTPCRELX relocations with addend != -4. PR gold/26939 * testsuite/ld-x86-64/pr26939-x32.d: New file. * testsuite/ld-x86-64/pr26939.d: Likewise. * testsuite/ld-x86-64/pr26939.s: Likewise. * testsuite/ld-x86-64/x86-64.exp: Run PR gold/26939 tests.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2020-11-24 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
PR gold/26939
|
||||||
|
* testsuite/ld-x86-64/pr26939-x32.d: New file.
|
||||||
|
* testsuite/ld-x86-64/pr26939.d: Likewise.
|
||||||
|
* testsuite/ld-x86-64/pr26939.s: Likewise.
|
||||||
|
* testsuite/ld-x86-64/x86-64.exp: Run PR gold/26939 tests.
|
||||||
|
|
||||||
2020-11-23 H.J. Lu <hongjiu.lu@intel.com>
|
2020-11-23 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
PR ld/26918
|
PR ld/26918
|
||||||
|
13
ld/testsuite/ld-x86-64/pr26939-x32.d
Normal file
13
ld/testsuite/ld-x86-64/pr26939-x32.d
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#source: pr26939.s
|
||||||
|
#as: --x32
|
||||||
|
#ld: -pie -melf32_x86_64
|
||||||
|
#objdump: -dw
|
||||||
|
|
||||||
|
.*: +file format .*
|
||||||
|
|
||||||
|
|
||||||
|
Disassembly of section .text:
|
||||||
|
|
||||||
|
#...
|
||||||
|
[ ]*[a-f0-9]+: 8b 05 ([0-9a-f]{2} ){4} * mov 0x[a-f0-9]+\(%rip\),%eax # [a-f0-9]+ <.*>
|
||||||
|
#pass
|
12
ld/testsuite/ld-x86-64/pr26939.d
Normal file
12
ld/testsuite/ld-x86-64/pr26939.d
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#as: --64
|
||||||
|
#ld: -pie -melf_x86_64
|
||||||
|
#objdump: -dw
|
||||||
|
|
||||||
|
.*: +file format .*
|
||||||
|
|
||||||
|
|
||||||
|
Disassembly of section .text:
|
||||||
|
|
||||||
|
#...
|
||||||
|
[ ]*[a-f0-9]+: 8b 05 ([0-9a-f]{2} ){4} * mov 0x[a-f0-9]+\(%rip\),%eax # [a-f0-9]+ <.*>
|
||||||
|
#pass
|
5
ld/testsuite/ld-x86-64/pr26939.s
Normal file
5
ld/testsuite/ld-x86-64/pr26939.s
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
.text
|
||||||
|
.globl _start
|
||||||
|
.type _start,@function
|
||||||
|
_start:
|
||||||
|
movl _start@GOTPCREL+4(%rip), %eax
|
@ -659,6 +659,8 @@ run_dump_test "pr20253-5b"
|
|||||||
run_dump_test "tlsdesc2"
|
run_dump_test "tlsdesc2"
|
||||||
run_dump_test "pr22048"
|
run_dump_test "pr22048"
|
||||||
run_dump_test "pr22929"
|
run_dump_test "pr22929"
|
||||||
|
run_dump_test "pr26939"
|
||||||
|
run_dump_test "pr26939-x32"
|
||||||
|
|
||||||
proc undefined_weak {cflags ldflags} {
|
proc undefined_weak {cflags ldflags} {
|
||||||
set testname "Undefined weak symbol"
|
set testname "Undefined weak symbol"
|
||||||
|
Reference in New Issue
Block a user