aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-x86-64/lea1d.d
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-10-16 03:14:40 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-10-16 03:14:40 -0700
commitb31bcacc489d6ede2e9bdfa9905de0ebfd919454 (patch)
treebfc87278ddb921af8d1aa397d8319b61011698db /ld/testsuite/ld-x86-64/lea1d.d
parentbaf9351a5983e36c9857b6f5b11e991d2bb1e9b6 (diff)
downloadgdb-b31bcacc489d6ede2e9bdfa9905de0ebfd919454.zip
gdb-b31bcacc489d6ede2e9bdfa9905de0ebfd919454.tar.gz
gdb-b31bcacc489d6ede2e9bdfa9905de0ebfd919454.tar.bz2
Convert mov to lea for loading address of local common symbol
There is no need to check def_regular when converting mov to lea for loading address of local symbols since def_regular may be false for common symbols and SYMBOL_REFERENCES_LOCAL is sufficient. bfd/ * elf32-i386.c (elf_i386_convert_mov_to_lea): Don't check def_regular. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise. ld/testsuite/ * ld-i386/lea1.s: Add a test for loading address of local common symbol. * ld-x86-64/lea1.s: Likewise. * ld-i386/lea1a.d: Updated. * ld-i386/lea1b.d: Likewise. * ld-i386/lea1c.d: 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/lea1d.d')
-rw-r--r--ld/testsuite/ld-x86-64/lea1d.d1
1 files changed, 1 insertions, 0 deletions
diff --git a/ld/testsuite/ld-x86-64/lea1d.d b/ld/testsuite/ld-x86-64/lea1d.d
index d117f6b..524980f 100644
--- a/ld/testsuite/ld-x86-64/lea1d.d
+++ b/ld/testsuite/ld-x86-64/lea1d.d
@@ -10,4 +10,5 @@ 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>
+[ ]*[a-f0-9]+: 48 8d 05 ([0-9a-f]{2} ){4} * lea 0x[a-f0-9]+\(%rip\),%rax # [a-f0-9]+ <bar>
#pass