From 3f65f59941a8cf0895384bc4700f41a2f37e1ff2 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sat, 1 Sep 2012 02:50:14 +0000 Subject: Don't optimize relocation against _DYNAMIC 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. --- ld/testsuite/ld-i386/mov1b.d | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ld/testsuite/ld-i386/mov1b.d (limited to 'ld/testsuite/ld-i386/mov1b.d') diff --git a/ld/testsuite/ld-i386/mov1b.d b/ld/testsuite/ld-i386/mov1b.d new file mode 100644 index 0000000..583dfc8 --- /dev/null +++ b/ld/testsuite/ld-i386/mov1b.d @@ -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 -- cgit v1.1