Fix internal error caused by conflicting default version definitions.
authorCary Coutant <ccoutant@gmail.com>
Mon, 23 Apr 2018 16:27:35 +0000 (09:27 -0700)
committerCary Coutant <ccoutant@gmail.com>
Tue, 24 Apr 2018 20:51:24 +0000 (13:51 -0700)
commit890d155592e66dc01fc4a9affba806c4e9fc36ba
tree0ccfa6f963c937ec8f5648ecb9d401ae676c0778
parentf67c0c9171508672167b6868c67211571421a1c6
Fix internal error caused by conflicting default version definitions.

gold/
PR gold/16504
* dynobj.cc (Versions::symbol_section_contents): Don't set
VERSYM_HIDDEN flag for undefined symbols.
* symtab.cc (Symbol_table::add_from_object): Don't override default
version definition with a different default version.
* symtab.h (Symbol::from_dyn): New method.
* testsuite/plugin_test.c (struct sym_info): Add ver field.
(claim_file_hook): Pass symbol version to plugin API.
(parse_readelf_line): Parse symbol version.
* testsuite/Makefile.am (ver_test_pr16504): New test case.
* testsuite/Makefile.in: Regenerate.
* testsuite/ver_test_pr16504.sh: New test script.
* testsuite/ver_test_pr16504_a.c: New source file.
* testsuite/ver_test_pr16504_a.script: New version script.
* testsuite/ver_test_pr16504_b.c: New source file.
* testsuite/ver_test_pr16504_b.script: New version script.
12 files changed:
gold/ChangeLog
gold/dynobj.cc
gold/symtab.cc
gold/symtab.h
gold/testsuite/Makefile.am
gold/testsuite/Makefile.in
gold/testsuite/plugin_test.c
gold/testsuite/ver_test_pr16504.sh [new file with mode: 0755]
gold/testsuite/ver_test_pr16504_a.c [new file with mode: 0644]
gold/testsuite/ver_test_pr16504_a.script [new file with mode: 0644]
gold/testsuite/ver_test_pr16504_b.c [new file with mode: 0644]
gold/testsuite/ver_test_pr16504_b.script [new file with mode: 0644]