+2018-01-12 Alan Modra <amodra@gmail.com>
+
+ PR ld/22649
+ * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
+ references on forced local symbols.
+
2018-01-12 Vlad Ivanov <vlad@ivanov.email>
* elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
if ((eh->elf.root.type == bfd_link_hash_defined
|| eh->elf.root.type == bfd_link_hash_defweak)
- && (eh->elf.ref_dynamic
+ && ((eh->elf.ref_dynamic && !eh->elf.forced_local)
|| ((eh->elf.def_regular || ELF_COMMON_DEF_P (&eh->elf))
&& ELF_ST_VISIBILITY (eh->elf.other) != STV_INTERNAL
&& ELF_ST_VISIBILITY (eh->elf.other) != STV_HIDDEN
+2018-01-12 Alan Modra <amodra@gmail.com>
+
+ PR ld/22649
+ * testsuite/ld-elf/pr22649.msg: Allow other messages.
+ * testsuite/ld-elf/shared.exp: Check that --gc-sections is
+ supported before running ld/22649 tests.
+
2018-01-12 Nick Clifton <nickc@redhat.com>
* emultempl/elf32.em (_handle_option): Add support for "-z undefs"
{} \
"pr22649-1.so" \
] \
- [list \
- "Build pr22649-2a.so" \
- "$LFLAGS -shared -gc-sections -print-gc-sections" \
- "" \
- "$AFLAGS_PIC" \
- {pr22649-2a.s} \
- {{ld pr22649.msg}} \
- "pr22649-2a.so" \
- ] \
- [list \
- "Build pr22649-2b.so" \
- "$LFLAGS -shared -gc-sections -print-gc-sections" \
- "tmpdir/pr22649-1.so" \
- "$AFLAGS_PIC" \
- {pr22649-2a.s} \
- {{ld pr22649.msg}} \
- "pr22649-2b.so" \
- ] \
- [list \
- "Build pr22649-2c.so" \
- "$LFLAGS -shared -gc-sections -print-gc-sections" \
- "" \
- "$AFLAGS_PIC" \
- {pr22649-2b.s} \
- {} \
- "pr22649-2b.so" \
- ] \
- [list \
- "Build pr22649-2d.so" \
- "$LFLAGS -shared -gc-sections -print-gc-sections" \
- "tmpdir/pr22649-1.so" \
- "$AFLAGS_PIC" \
- {pr22649-2b.s} \
- {} \
- "pr22649-2b.so" \
- ] \
]
+if { [check_gc_sections_available] } {
+ run_ld_link_tests [list \
+ [list \
+ "Build pr22649-2a.so" \
+ "$LFLAGS -shared -gc-sections -print-gc-sections" \
+ "" \
+ "$AFLAGS_PIC" \
+ {pr22649-2a.s} \
+ {{ld pr22649.msg}} \
+ "pr22649-2a.so" \
+ ] \
+ [list \
+ "Build pr22649-2b.so" \
+ "$LFLAGS -shared -gc-sections -print-gc-sections" \
+ "tmpdir/pr22649-1.so" \
+ "$AFLAGS_PIC" \
+ {pr22649-2a.s} \
+ {{ld pr22649.msg}} \
+ "pr22649-2b.so" \
+ ] \
+ [list \
+ "Build pr22649-2c.so" \
+ "$LFLAGS -shared -gc-sections -print-gc-sections" \
+ "" \
+ "$AFLAGS_PIC" \
+ {pr22649-2b.s} \
+ {} \
+ "pr22649-2b.so" \
+ ] \
+ [list \
+ "Build pr22649-2d.so" \
+ "$LFLAGS -shared -gc-sections -print-gc-sections" \
+ "tmpdir/pr22649-1.so" \
+ "$AFLAGS_PIC" \
+ {pr22649-2b.s} \
+ {} \
+ "pr22649-2b.so" \
+ ] \
+ ]
+}
+
run_ld_link_tests [list \
[list \
"DT_TEXTREL in shared lib" \