+2014-08-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/17306
+ * elf32-i386.c (elf_i386_convert_mov_to_lea): Use bfd_is_abs_section
+ to check discarded input section.
+ * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
+
2014-08-27 H.J. Lu <hongjiu.lu@intel.com>
PR ld/17313
/* Nothing to do if there are no codes, no relocations or no output. */
if ((sec->flags & (SEC_CODE | SEC_RELOC)) != (SEC_CODE | SEC_RELOC)
|| sec->reloc_count == 0
- || discarded_section (sec))
+ || bfd_is_abs_section (sec->output_section))
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
/* Nothing to do if there are no codes, no relocations or no output. */
if ((sec->flags & (SEC_CODE | SEC_RELOC)) != (SEC_CODE | SEC_RELOC)
|| sec->reloc_count == 0
- || discarded_section (sec))
+ || bfd_is_abs_section (sec->output_section))
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+2014-08-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/17306
+ * ld-i386/i386.exp (i386tests): Add tests for PR ld/17306.
+ * ld-x86-64/x86-64.exp (x86_64tests): Likewise.
+
+ * ld-i386/pr17306a.s: New file.
+ * ld-i386/pr17306b.s: Likewise.
+ * ld-x86-64/pr17306a.s: Likewise.
+ * ld-x86-64/pr17306b.s: Likewise.
+
2014-08-27 H.J. Lu <hongjiu.lu@intel.com>
PR ld/17313
"--32" {zero.s} {} ""}
{"PR ld/17313 (2)" "-melf_i386 -shared --just-symbols=tmpdir/zero.o" ""
"--32" {lea1.s} {} "libpr17313.so"}
+ {"PR ld/17306 (1)" "-melf_i386" ""
+ "--32" {pr17306b.s} {} ""}
+ {"PR ld/17306 (2)" "-melf_i386 -shared -Bsymbolic --just-symbols=tmpdir/pr17306b.o" ""
+ "--32" {pr17306a.s} {} "libpr17306.so"}
}
# So as to avoid rewriting every last test case here in a nacl variant,
--- /dev/null
+ .data
+ .globl foo
+foo:
+ .long -1
+ .text
+ .globl _start
+ .type _start, @function
+_start:
+ pushl foo@GOT(%ebx)
--- /dev/null
+ .text
+ movl foo@GOT(%ebx), %eax
--- /dev/null
+ .data
+ .globl foo
+foo:
+ .quad -1
+ .text
+ .globl _start
+ .type _start, @function
+_start:
+ pushq foo@GOTPCREL(%rip)
--- /dev/null
+ .text
+ movq foo@GOTPCREL(%rip), %rax
"--64" {dummy.s} {} ""}
{"PR ld/17313 (2)" "-melf_x86_64 -shared --just-symbols=tmpdir/dummy.o" ""
"--64" {lea1.s} {} "libpr17313.so"}
+ {"PR ld/17306 (1)" "-melf_x86_64" ""
+ "--64" {pr17306b.s} {} ""}
+ {"PR ld/17306 (2)" "-melf_x86_64 -shared -Bsymbolic --just-symbols=tmpdir/pr17306b.o" ""
+ "--64" {pr17306a.s} {} "libpr17306.so"}
}
# So as to avoid rewriting every last test case here in a nacl variant,