Browse Source
bfd/ * elf32-i386.c (elf_i386_convert_mov_to_lea): Don't optimize _DYNAMIC. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise. ld/testsuite/ * ld-i386/i386.exp: Run mov1a, mov1b. * ld-x86-64/x86-64.exp: Run mov1a, mov1b, mov1c, mov1d. * ld-i386/mov1.s: New file. * ld-i386/mov1a.d: Likewise. * ld-i386/mov1b.d: Likewise. * ld-x86-64/mov1.s: Likewise. * ld-x86-64/mov1a.d: Likewise. * ld-x86-64/mov1b.d: Likewise. * ld-x86-64/mov1c.d: Likewise. * ld-x86-64/mov1d.d: Likewise.gdb_7_6-branch
14 changed files with 123 additions and 2 deletions
@ -0,0 +1,6 @@ |
|||
.text |
|||
.globl _start |
|||
.type _start, @function |
|||
_start: |
|||
movl _DYNAMIC@GOT(%ecx), %eax |
|||
.size _start, .-_start |
|||
@ -0,0 +1,13 @@ |
|||
#source: mov1.s |
|||
#as: --32 |
|||
#ld: -shared -melf_i386 |
|||
#objdump: -dw |
|||
|
|||
.*: +file format .* |
|||
|
|||
|
|||
Disassembly of section .text: |
|||
|
|||
#... |
|||
[ ]*[a-f0-9]+: 8b 81 ([0-9a-f]{2} ){4} * mov -0x[a-f0-9]+\(%ecx\),%eax |
|||
#pass |
|||
@ -0,0 +1,13 @@ |
|||
#source: mov1.s |
|||
#as: --32 |
|||
#ld: -pie -melf_i386 |
|||
#objdump: -dw |
|||
|
|||
.*: +file format .* |
|||
|
|||
|
|||
Disassembly of section .text: |
|||
|
|||
#... |
|||
[ ]*[a-f0-9]+: 8b 81 ([0-9a-f]{2} ){4} * mov -0x[a-f0-9]+\(%ecx\),%eax |
|||
#pass |
|||
@ -0,0 +1,6 @@ |
|||
.text |
|||
.globl _start |
|||
.type _start, @function |
|||
_start: |
|||
movq _DYNAMIC@GOTPCREL(%rip), %rax |
|||
.size _start, .-_start |
|||
@ -0,0 +1,13 @@ |
|||
#source: mov1.s |
|||
#as: --64 |
|||
#ld: -shared -melf_x86_64 |
|||
#objdump: -dw |
|||
|
|||
.*: +file format .* |
|||
|
|||
|
|||
Disassembly of section .text: |
|||
|
|||
#... |
|||
[ ]*[a-f0-9]+: 48 8b 05 ([0-9a-f]{2} ){4} * mov 0x[a-f0-9]+\(%rip\),%rax # [a-f0-9]+ <_DYNAMIC\+0x[a-f0-9]+> |
|||
#pass |
|||
@ -0,0 +1,13 @@ |
|||
#source: mov1.s |
|||
#as: --64 |
|||
#ld: -pie -melf_x86_64 |
|||
#objdump: -dw |
|||
|
|||
.*: +file format .* |
|||
|
|||
|
|||
Disassembly of section .text: |
|||
|
|||
#... |
|||
[ ]*[a-f0-9]+: 48 8b 05 ([0-9a-f]{2} ){4} * mov 0x[a-f0-9]+\(%rip\),%rax # [a-f0-9]+ <_DYNAMIC\+0x[a-f0-9]+> |
|||
#pass |
|||
@ -0,0 +1,13 @@ |
|||
#source: mov1.s |
|||
#as: --x32 |
|||
#ld: -shared -melf32_x86_64 |
|||
#objdump: -dw |
|||
|
|||
.*: +file format .* |
|||
|
|||
|
|||
Disassembly of section .text: |
|||
|
|||
#... |
|||
[ ]*[a-f0-9]+: 48 8b 05 ([0-9a-f]{2} ){4} * mov 0x[a-f0-9]+\(%rip\),%rax # [a-f0-9]+ <_DYNAMIC\+0x[a-f0-9]+> |
|||
#pass |
|||
@ -0,0 +1,13 @@ |
|||
#source: mov1.s |
|||
#as: --x32 |
|||
#ld: -pie -melf32_x86_64 |
|||
#objdump: -dw |
|||
|
|||
.*: +file format .* |
|||
|
|||
|
|||
Disassembly of section .text: |
|||
|
|||
#... |
|||
[ ]*[a-f0-9]+: 48 8b 05 ([0-9a-f]{2} ){4} * mov 0x[a-f0-9]+\(%rip\),%rax # [a-f0-9]+ <_DYNAMIC\+0x[a-f0-9]+> |
|||
#pass |
|||
Loading…
Reference in new issue