]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
elf: Skip the archive if the symbol isn't referenced
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 16 Apr 2024 22:48:21 +0000 (15:48 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 17 Apr 2024 00:45:23 +0000 (17:45 -0700)
commitc2fbf57864a2da2ceda81706a54d125ef3fce0a7
tree15b12d00599ddfaccc3cee67e324b57040f011cb
parent79484e95665430b6960425e5c50ffb9f90072bf4
elf: Skip the archive if the symbol isn't referenced

Also skip the archive if the symbol isn't referenced by a regular object.

bfd/

PR ld/31644
* elflink.c (elf_link_add_archive_symbols): Also skip the archive
if the symbol isn't referenced by a regular object.

ld/

PR ld/31644
* testsuite/ld-plugin/lto.exp: Run PR ld/31644 tests.
* testsuite/ld-plugin/pr31644a.c: New test.
* testsuite/ld-plugin/pr31644b.c: Likewise.
* testsuite/ld-plugin/pr31644c.c: Likewise.
bfd/elflink.c
ld/testsuite/ld-plugin/lto.exp
ld/testsuite/ld-plugin/pr31644a.c [new file with mode: 0644]
ld/testsuite/ld-plugin/pr31644b.c [new file with mode: 0644]
ld/testsuite/ld-plugin/pr31644c.c [new file with mode: 0644]