From 93d49941edbb5274bee6ce3e547a07c7ce4c4301 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 10 Sep 2020 07:52:03 -0700 Subject: ld: Add more tests for --as-needed Prior to commit 1e3b96fd6cf0c7d018083994ad951ccf92aba582 Author: Alan Modra 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. --- ld/ChangeLog | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ld/ChangeLog') diff --git a/ld/ChangeLog b/ld/ChangeLog index 46a4aca..3e86628 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,13 @@ +2020-09-10 H.J. Lu + + 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. + 2020-09-10 Alan Modra * testsuite/ld-elf/pr26580-2.sd: Accept undefined symbol. -- cgit v1.1