Don't optimize relocation against _DYNAMIC
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 1 Sep 2012 02:50:14 +0000 (02:50 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 1 Sep 2012 02:50:14 +0000 (02:50 +0000)
commit3f65f59941a8cf0895384bc4700f41a2f37e1ff2
tree9be1e0f747711680687cd720580f4df267c44a3f
parentf25b8a5e715ce96f342f8cb7b39ac0781166a412
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.
14 files changed:
bfd/ChangeLog
bfd/elf32-i386.c
bfd/elf64-x86-64.c
ld/testsuite/ChangeLog
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/mov1.s [new file with mode: 0644]
ld/testsuite/ld-i386/mov1a.d [new file with mode: 0644]
ld/testsuite/ld-i386/mov1b.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/mov1.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/mov1a.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/mov1b.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/mov1c.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/mov1d.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/x86-64.exp