https://sourceware.org/bugzilla/show_bug.cgi?id=26590
--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by H.J. Lu <h...@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=93d49941edbb5274bee6ce3e547a07c7ce4c4301 commit 93d49941edbb5274bee6ce3e547a07c7ce4c4301 Author: H.J. Lu <hjl.to...@gmail.com> Date: Thu Sep 10 07:52:03 2020 -0700 ld: Add more tests for --as-needed Prior to commit 1e3b96fd6cf0c7d018083994ad951ccf92aba582 Author: Alan Modra <amo...@gmail.com> Date: Fri Sep 4 13:54:21 2020 +0930 Allow plugin syms to mark as-needed shared libs needed when removing unused IR symbol references, ld didn't add unnecessary DT_NEEDED libraries which may lead to undefined symbol reference in a --as-needed library when the symbol is defined in a prior --as-needed library and there is no reference in relocatable inputs. This behavior is desirable since it ensures that both lazy and non-lazy bindings work the same way. The problem is with --as-needed libraries, which happens with and without LTO. Now, the linker may add many unnecessary DT_NEEDED libraries for IR inputs. PR ld/26590 * testsuite/ld-elf/pr26590.err: New file. * testsuite/ld-elf/pr26590a.c: Likewise. * testsuite/ld-elf/pr26590b.c: Likewise. * testsuite/ld-elf/pr26590c.c: Likewise. * testsuite/ld-elf/pr26590d.c: Likewise. * testsuite/ld-elf/shared.exp: Run ld/26590 tests. -- You are receiving this mail because: You are on the CC list for the bug.