Check if symbol is defined when converting mov to lea
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 16 Oct 2015 11:17:49 +0000 (04:17 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 16 Oct 2015 11:21:03 +0000 (04:21 -0700)
commit75a06c790f96f07e859be95d3c3c084a718afeef
tree0bfcfdf1a076b872319aa77ccd463188a206b0a9
parentb31bcacc489d6ede2e9bdfa9905de0ebfd919454
Check if symbol is defined when converting mov to lea

We need to check if symbol is defined when converting mov to lea since
SYMBOL_REFERENCES_LOCAL may return true on hidden undefined symbols.

* elf32-i386.c (elf_i386_convert_mov_to_lea): Check if symbol
is defined.
* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
bfd/ChangeLog
bfd/elf32-i386.c
bfd/elf64-x86-64.c