Fixes for "Ignore dynamic references on forced local symbols"
PowerPC64 has its own mark_dynamic_ref, which needs the same change as
made by
d664fd41e1 to the generic ELF version. Some other targets
discard more than just .data, so allow for that too in expected ld
messages.
bfd/
PR ld/22649
* elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
references on forced local symbols.
ld/
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.