diff options
author | Maciej W. Rozycki <macro@imgtec.com> | 2017-02-21 01:46:42 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@imgtec.com> | 2017-02-22 18:16:28 +0000 |
commit | 902e9fc76a0ec9f642cefa71ef88cca1c675ad54 (patch) | |
tree | fcdfccabdc62dace9dc54f36aecb7226f001600e /bfd/ChangeLog | |
parent | 5ff6a06c215a5288787decfb933591afb5aa434d (diff) | |
download | gdb-902e9fc76a0ec9f642cefa71ef88cca1c675ad54.zip gdb-902e9fc76a0ec9f642cefa71ef88cca1c675ad54.tar.gz gdb-902e9fc76a0ec9f642cefa71ef88cca1c675ad54.tar.bz2 |
PR ld/20828: Move symbol version processing ahead of GC symbol sweep
Complement commit b531344c34b0 ("PR ld/20828: Reorder the symbol sweep
stage of section GC") and commit 81ff47b3a546 ("PR ld/20828: Fix linker
script symbols wrongly forced local with section GC") and move symbol
version processing ahead of the symbol sweep stage of section GC, all in
`bfd_elf_size_dynamic_sections', so that version symbols created stay in
the global scope and are not output as local symbols to the dynamic
symbol table in the presence of corresponding symbol definitions pulled
from a DSO involved in a link.
Consolidate the whole of symbol version processing into a single block
from all parts scattered across the function and rearranging the local
variables used as necessary, however leaving the setting of dynamic
entries associated with the DT_VERDEF, DT_VERDEFNUM, DT_VERNEED and
DT_VERNEEDNUM tags and the SEC_EXCLUDE flag for unused `.gnu.version'
section in the original places.
With the rearrangement of code blocks `Elf_Internal_Verneed *t' would
shadow the previous definition of `struct bfd_elf_version_tree *t', so
rename the former variable to `vn'.
bfd/
PR ld/20828
* elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
processing ahead of the call to `elf_gc_sweep_symbol'.
ld/
PR ld/20828
* testsuite/ld-elf/pr20828-d.sd: New test.
* testsuite/ld-elf/pr20828-e.sd: New test.
* testsuite/ld-elf/pr20828-v.od: New test.
* testsuite/ld-elf/pr20828-v.ver: New test version script.
* testsuite/ld-elf/pr20828-v.ld: New test linker script.
* testsuite/ld-elf/pr20828.ld: Add `.gnu.version' and
`.gnu.version_d'.
* testsuite/ld-elf/shared.exp: Run the new tests.
Diffstat (limited to 'bfd/ChangeLog')
-rw-r--r-- | bfd/ChangeLog | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 8f8d375..24b27c8 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2017-02-22 Maciej W. Rozycki <macro@imgtec.com> + + PR ld/20828 + * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version + processing ahead of the call to `elf_gc_sweep_symbol'. + 2017-02-22 Nick Clifton <nickc@redhat.com> PR binutils/21193 |