+2015-10-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ * 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.
+
2015-10-15 H.J. Lu <hongjiu.lu@intel.com>
* elflink.c (_bfd_elf_merge_symbol): Fix typos in comments
/* STT_GNU_IFUNC must keep R_386_GOT32 relocation. We also avoid
optimizing _DYNAMIC since ld.so may use its link-time address. */
- if (h->def_regular
- && h->type != STT_GNU_IFUNC
+ if (h->type != STT_GNU_IFUNC
&& h != htab->elf.hdynamic
&& SYMBOL_REFERENCES_LOCAL (link_info, h)
&& irel->r_offset >= 2
/* STT_GNU_IFUNC must keep R_X86_64_GOTPCREL relocation. We also
avoid optimizing _DYNAMIC since ld.so may use its link-time
address. */
- if (h->def_regular
- && h->type != STT_GNU_IFUNC
+ if (h->type != STT_GNU_IFUNC
&& h != htab->elf.hdynamic
&& SYMBOL_REFERENCES_LOCAL (link_info, h))
{
+2015-10-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ * 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.
+
2015-10-15 Alan Modra <amodra@gmail.com>
* config/default.exp (size): New global.
.type _start, @function
_start:
movl foo@GOT(%ecx), %eax
+ movl bar@GOT(%ecx), %eax
.size _start, .-_start
+ .comm pad,4,4
+ .comm bar,4,4
#...
[ ]*[a-f0-9]+: 8d 81 ([0-9a-f]{2} ){4} * lea -0x[a-f0-9]+\(%ecx\),%eax
+[ ]*[a-f0-9]+: 8d 81 ([0-9a-f]{2} ){4} * lea 0x[a-f0-9]+\(%ecx\),%eax
#pass
#...
[ ]*[a-f0-9]+: 8d 81 ([0-9a-f]{2} ){4} * lea -0x[a-f0-9]+\(%ecx\),%eax
+[ ]*[a-f0-9]+: 8d 81 ([0-9a-f]{2} ){4} * lea 0x[a-f0-9]+\(%ecx\),%eax
#pass
#...
[ ]*[a-f0-9]+: 8d 81 ([0-9a-f]{2} ){4} * lea -0x[a-f0-9]+\(%ecx\),%eax
+[ ]*[a-f0-9]+: 8d 81 ([0-9a-f]{2} ){4} * lea 0x[a-f0-9]+\(%ecx\),%eax
#pass
.type _start, @function
_start:
movq foo@GOTPCREL(%rip), %rax
+ movq bar@GOTPCREL(%rip), %rax
.size _start, .-_start
+ .comm pad,4,4
+ .comm bar,4,4
#...
[ ]*[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
#...
[ ]*[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
#...
[ ]*[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
#...
[ ]*[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
#...
[ ]*[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
#...
[ ]*[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