diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-08-31 04:26:17 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-08-31 04:26:17 +0000 |
commit | 80d873266deca488bd8059e32780e8ce3ef6191d (patch) | |
tree | 3c0be3e693f706776a6a402516a1f013d75b1d2d /ld/testsuite/ld-x86-64/lea1e.d | |
parent | 11cba4accf7f9a82fdb7902f0e36521038eda205 (diff) | |
download | gdb-80d873266deca488bd8059e32780e8ce3ef6191d.zip gdb-80d873266deca488bd8059e32780e8ce3ef6191d.tar.gz gdb-80d873266deca488bd8059e32780e8ce3ef6191d.tar.bz2 |
Convert mov to lea for loading local function address
bfd/
* elf32-i386.c (elf_i386_relocate_section): Convert
"mov foo@GOT(%reg), %reg" to "lea foo@GOTOFF(%reg), %reg"
for local symbols.
* elf64-x86-64.c (elf_x86_64_relocate_section): Convert
"mov foo@GOTPCREL(%rip), %reg" to "lea foo(%rip), %reg"
for local symbols.
ld/testsuite/
* ld-i386/i386.exp: Run lea1a, lea1b, lea1c.
* ld-x86-64/x86-64.exp: Run lea1a, lea1b, lea1c, lea1d, lea1e,
lea1f.
* ld-i386/lea1.s: New file.
* ld-i386/lea1a.d: Likewise.
* ld-i386/lea1b.d: Likewise.
* ld-i386/lea1c.d: Likewise.
* ld-x86-64/lea1.s: Likewise.
* ld-x86-64/lea1a.d: Likewise.
* ld-x86-64/lea1b.d: Likewise.
* ld-x86-64/lea1c.d: Likewise.
* ld-x86-64/lea1d.d: Likewise.
* ld-x86-64/lea1e.d: Likewise.
* ld-x86-64/lea1f.d: Likewise.
Diffstat (limited to 'ld/testsuite/ld-x86-64/lea1e.d')
-rw-r--r-- | ld/testsuite/ld-x86-64/lea1e.d | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ld/testsuite/ld-x86-64/lea1e.d b/ld/testsuite/ld-x86-64/lea1e.d new file mode 100644 index 0000000..bde3e6f --- /dev/null +++ b/ld/testsuite/ld-x86-64/lea1e.d @@ -0,0 +1,13 @@ +#source: lea1.s +#as: --x32 +#ld: -pie -melf32_x86_64 +#objdump: -dw + +.*: +file format .* + + +Disassembly of section .text: + +#... +[ ]*[a-f0-9]+: 48 8d 05 ([0-9a-f]{2} ){4} * lea -0x[a-f0-9]+\(%rip\),%rax # [a-f0-9]+ <foo> +#pass |