diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2019-04-26 07:52:00 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2019-04-26 07:52:09 -0700 |
commit | c54f15248ee990df6cea0b4730cd61b227a0e082 (patch) | |
tree | c1549a19c4b4e75fb7ab4d6d8a03d6e75c5f0c67 /bfd/elflink.c | |
parent | 8e1920d611ab3330d6dfa610ff771cf5dc796097 (diff) | |
download | gdb-c54f15248ee990df6cea0b4730cd61b227a0e082.zip gdb-c54f15248ee990df6cea0b4730cd61b227a0e082.tar.gz gdb-c54f15248ee990df6cea0b4730cd61b227a0e082.tar.bz2 |
Don't complain undefined weak dynamic reference
When undefined non-weak references in IR objects are optimized out
by LTO, we can have weak dynamic referencs to symbols marked with
bfd_link_hash_undefined. We shouldn't complain such undefined weak
dynamic references.
bfd/
PR ld/24486
* elflink.c (elf_link_output_extsym): Don't complain undefined
weak dynamic reference.
ld/
PR ld/24486
* testsuite/ld-plugin/lto.exp: Run PR ld/24486 tests.
* testsuite/ld-plugin/pr24486a.c: New file.
* testsuite/ld-plugin/pr24486b.c: Likewise.
* testsuite/ld-plugin/pr24486c.c: Likewise.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 81e667d..ddeaa08 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -9776,7 +9776,7 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) /* If we are reporting errors for this situation then do so now. */ if (!ignore_undef - && h->ref_dynamic + && h->ref_dynamic_nonweak && (!h->ref_regular || flinfo->info->gc_sections) && !elf_link_check_versioned_symbol (flinfo->info, bed, h) && flinfo->info->unresolved_syms_in_shared_libs != RM_IGNORE) |