diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-09-14 11:41:58 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-09-14 12:29:29 -0700 |
commit | 5e5e02aeca4a6edccbf11b5f900d95bba59b9932 (patch) | |
tree | 75d5fa026dbb595fa819238129eb9cdb9e46b868 /ld/testsuite/ld-x86-64 | |
parent | 26e53f3eace35cabeec4559d417df99a48f6477a (diff) | |
download | gdb-5e5e02aeca4a6edccbf11b5f900d95bba59b9932.zip gdb-5e5e02aeca4a6edccbf11b5f900d95bba59b9932.tar.gz gdb-5e5e02aeca4a6edccbf11b5f900d95bba59b9932.tar.bz2 |
x86: Cache section contents and relocations
bfd/
PR ld/22135
* elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
to indicate if conversion is performed.
(elf_i386_check_relocs): Cache section contents and relocations
if conversion is performed.
* elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
contents and relocations if conversion is performed.
ld/
PR ld/22135
* testsuite/ld-i386/i386.exp: Run pr22135.
* testsuite/ld-x86-64/x86-64.exp: Likewise.
* testsuite/ld-i386/pr22135.d: New file.
* testsuite/ld-i386/pr22135.s: Likewise.
* testsuite/ld-x86-64/pr22135.d: Likewise.
* testsuite/ld-x86-64/pr22135.s: Likewise.
Diffstat (limited to 'ld/testsuite/ld-x86-64')
-rw-r--r-- | ld/testsuite/ld-x86-64/pr22135.d | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pr22135.s | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/x86-64.exp | 1 |
3 files changed, 24 insertions, 0 deletions
diff --git a/ld/testsuite/ld-x86-64/pr22135.d b/ld/testsuite/ld-x86-64/pr22135.d new file mode 100644 index 0000000..2cd6861 --- /dev/null +++ b/ld/testsuite/ld-x86-64/pr22135.d @@ -0,0 +1,12 @@ +#as: --64 +#ld: -pie -melf_x86_64 --no-keep-memory +#objdump: -dw + +.*: +file format .* + + +Disassembly of section .text: + +#... +[ ]*[a-f0-9]+: 8d 05 ([0-9a-f]{2} ){4} * lea -0x[a-f0-9]+\(%rip\),%eax # [a-f0-9]+ <foo> +#pass diff --git a/ld/testsuite/ld-x86-64/pr22135.s b/ld/testsuite/ld-x86-64/pr22135.s new file mode 100644 index 0000000..f4dff5c --- /dev/null +++ b/ld/testsuite/ld-x86-64/pr22135.s @@ -0,0 +1,11 @@ + .text + .globl foo + .type foo, @function +foo: + ret + .size foo, .-foo + .globl _start + .type _start, @function +_start: + movl foo@GOTPCREL(%rip), %eax + .size _start, .-_start diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp index edf8896..676d44a 100644 --- a/ld/testsuite/ld-x86-64/x86-64.exp +++ b/ld/testsuite/ld-x86-64/x86-64.exp @@ -377,6 +377,7 @@ run_dump_test "pr22115-1c" run_dump_test "pr22115-1c-x32" run_dump_test "pr22115-1d" run_dump_test "pr22115-1d-x32" +run_dump_test "pr22135" if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} { return |