From daa67607072dd28275d2a54d6fba1623094905e8 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 31 Aug 2012 20:41:41 +0000 Subject: Convert mov to lea in size_dynamic_sections bfd/ * elf32-i386.c (elf_i386_convert_mov_to_lea): New. (elf_i386_size_dynamic_sections): Use it on input sections. (elf_i386_relocate_section): Don't convert "mov foo@GOT(%reg), %reg" to "lea foo@GOTOFF(%reg), %reg" for local symbols here. * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): New. (elf_x86_64_size_dynamic_sections): Use it on input sections. (elf_x86_64_relocate_section): Don't convert "mov foo@GOTPCREL(%rip), %reg" to "lea foo@GOTOFF(%reg), %reg" for local symbols. ld/testsuite/ * ld-i386/i386.exp: Run lea1d, lea1f, lea1f. * ld-x86-64/x86-64.exp: Run lea1g, lea1h, lea1i, lea1j, lea1k, lea1l. * ld-ifunc/ifunc-13-i386.d: Remove R_386_RELATIVE entry. * ld-i386/lea1d.d: New file. * ld-i386/lea1e.d: Likewise. * ld-i386/lea1f.d: Likewise. * ld-x86-64/lea1g.d: Likewise. * ld-x86-64/lea1h.d: Likewise. * ld-x86-64/lea1i.d: Likewise. * ld-x86-64/lea1j.d: Likewise. * ld-x86-64/lea1k.d: Likewise. * ld-x86-64/lea1l.d: Likewise. --- ld/testsuite/ld-x86-64/lea1l.d | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 ld/testsuite/ld-x86-64/lea1l.d (limited to 'ld/testsuite/ld-x86-64/lea1l.d') diff --git a/ld/testsuite/ld-x86-64/lea1l.d b/ld/testsuite/ld-x86-64/lea1l.d new file mode 100644 index 0000000..1df2bc1 --- /dev/null +++ b/ld/testsuite/ld-x86-64/lea1l.d @@ -0,0 +1,9 @@ +#source: lea1.s +#as: --x32 +#ld: -melf32_x86_64 +#readelf: -Sw + +#failif +#... +[ ]*\[.*\][ ]+.*\.got .* +#... -- cgit v1.1