Reload --as-needed libraries inside groups
authorAlan Modra <amodra@gmail.com>
Thu, 3 Jul 2014 07:02:45 +0000 (16:32 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 3 Jul 2014 07:35:42 +0000 (17:05 +0930)
commitd215621ebe5a6b60dff2e60c788a0f761e3cb5bd
treeeb5c641bf87b201f435e3cc6d0d753a7410ceab0
parentfd48cee0093fef69608959d0f577c0c81fe24eec
Reload --as-needed libraries inside groups

When a shared library appears within --start-group/--end-group ld may
only discover a need for loading the library on the second or
subsequent pass over archive libraries, as more objects are extracted.

ld/
PR 17068
* ldlang.c (load_symbols): Always check flags.reload.
(open_input_bfds): Always reload --as-needed shared libraries,
not just when rescanning.
* ldlang.h (struct lang_input_statement_flags): Update reload comment.
* plugin.c (plugin_should_reload): Assume shared library arg.
* plugin.h (plugin_should_reload): Update comment.
ld/testsuite
* ld-elf/pr17068.s: New.
* ld-elf/pr17068a.s: New.
* ld-elf/pr17068b.s: New.
* ld-elf/pr17068c.s: New.
* ld-elf/pr17068d.s: New.
* ld-elf/pr17068e.s: New.
* ld-elf/pr17068ez.s: New.
* ld-elf/elf.exp: Run new test.
14 files changed:
ld/ChangeLog
ld/ldlang.c
ld/ldlang.h
ld/plugin.c
ld/plugin.h
ld/testsuite/ChangeLog
ld/testsuite/ld-elf/elf.exp
ld/testsuite/ld-elf/pr17068.s [new file with mode: 0644]
ld/testsuite/ld-elf/pr17068a.s [new file with mode: 0644]
ld/testsuite/ld-elf/pr17068b.s [new file with mode: 0644]
ld/testsuite/ld-elf/pr17068c.s [new file with mode: 0644]
ld/testsuite/ld-elf/pr17068d.s [new file with mode: 0644]
ld/testsuite/ld-elf/pr17068e.s [new file with mode: 0644]
ld/testsuite/ld-elf/pr17068ez.s [new file with mode: 0644]