diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2018-03-20 03:51:26 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2018-03-20 03:51:48 -0700 |
commit | 416c34d683f2a17aefe19afb466af4316c7c603b (patch) | |
tree | 9691a2e890bc0a280025b14bb06678c1ee72e47c /bfd/elflink.c | |
parent | 9d6aac5354566288d7bc734213e5ed0c3cb3c4ca (diff) | |
download | gdb-416c34d683f2a17aefe19afb466af4316c7c603b.zip gdb-416c34d683f2a17aefe19afb466af4316c7c603b.tar.gz gdb-416c34d683f2a17aefe19afb466af4316c7c603b.tar.bz2 |
Set non_ir_ref_dynamic if a symbol is made dynamic
If a symbol is made dynamic by --dynamic-list, it has non-IR reference.
bfd/
PR ld/22983
* elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
ld/
PR ld/22983
* testsuite/ld-plugin/lto.exp: Run PR ld/22983 test.
* testsuite/ld-plugin/pr22983.d: New file.
* testsuite/ld-plugin/pr22983.t: Likewise.
* testsuite/ld-plugin/pr22983a.c: Likewise.
* testsuite/ld-plugin/pr22983b.c: Likewise.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 6a3d516..ce3765e 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -586,7 +586,12 @@ bfd_elf_link_mark_dynamic_symbol (struct bfd_link_info *info, || (d != NULL && h->non_elf && (*d->match) (&d->head, NULL, h->root.root.string))) - h->dynamic = 1; + { + h->dynamic = 1; + /* NB: If a symbol is made dynamic by --dynamic-list, it has + non-IR reference. */ + h->root.non_ir_ref_dynamic = 1; + } } /* Record an assignment to a symbol made by a linker script. We need |