diff options
author | Cary Coutant <ccoutant@gmail.com> | 2018-04-23 09:27:35 -0700 |
---|---|---|
committer | Cary Coutant <ccoutant@gmail.com> | 2018-04-24 13:51:24 -0700 |
commit | 890d155592e66dc01fc4a9affba806c4e9fc36ba (patch) | |
tree | 0ccfa6f963c937ec8f5648ecb9d401ae676c0778 /gold/testsuite/Makefile.am | |
parent | f67c0c9171508672167b6868c67211571421a1c6 (diff) | |
download | gdb-890d155592e66dc01fc4a9affba806c4e9fc36ba.zip gdb-890d155592e66dc01fc4a9affba806c4e9fc36ba.tar.gz gdb-890d155592e66dc01fc4a9affba806c4e9fc36ba.tar.bz2 |
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.
Diffstat (limited to 'gold/testsuite/Makefile.am')
-rw-r--r-- | gold/testsuite/Makefile.am | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am index 7140df6..c926f8b 100644 --- a/gold/testsuite/Makefile.am +++ b/gold/testsuite/Makefile.am @@ -2516,6 +2516,23 @@ plugin_pr22868_b_ir.o: plugin_pr22868_b.c plugin_pr22868_b.o: plugin_pr22868_b.c $(COMPILE) -c -fpic -o $@ $< +check_SCRIPTS += ver_test_pr16504.sh +check_DATA += ver_test_pr16504.stdout +ver_test_pr16504.stdout: ver_test_pr16504.so + $(TEST_READELF) -W --dyn-syms $< >$@ 2>/dev/null +ver_test_pr16504.so: ver_test_pr16504_a.so ver_test_pr16504_b.o.syms ver_test_pr16504_b.script gcctestdir/ld + gcctestdir/ld -shared -o $@ --plugin ./plugin_test.so --version-script $(srcdir)/ver_test_pr16504_b.script ver_test_pr16504_b.o.syms ver_test_pr16504_a.so +ver_test_pr16504_a.so: ver_test_pr16504_a.o ver_test_pr16504_a.script gcctestdir/ld + gcctestdir/ld -shared -o $@ --version-script $(srcdir)/ver_test_pr16504_a.script ver_test_pr16504_a.o +ver_test_pr16504_a.o: ver_test_pr16504_a.c + $(COMPILE) -c -fpic -o $@ $< +# Filter out the UNDEFs from the symbols file to simulate GCC behavior, +# which does not pass the UNDEF from a .symver directive. +ver_test_pr16504_b.o.syms: ver_test_pr16504_b.o + $(TEST_READELF) -sW $< 2>/dev/null | grep -v "UND" >$@ +ver_test_pr16504_b.o: ver_test_pr16504_b.c + $(COMPILE) -c -fpic -o $@ $< + endif PLUGINS check_PROGRAMS += exclude_libs_test |