diff options
author | Alan Modra <amodra@gmail.com> | 2017-09-28 17:11:38 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-09-28 17:36:36 +0930 |
commit | 1a3b5c34fe371f618402f811a981839c9191ff9f (patch) | |
tree | aac6ef259428bece256c9ab1fb0e527e363116d1 /ld/testsuite/ld-plugin/lto.exp | |
parent | 50300765aa46894d9347f760fd10dab829d564f7 (diff) | |
download | gdb-1a3b5c34fe371f618402f811a981839c9191ff9f.zip gdb-1a3b5c34fe371f618402f811a981839c9191ff9f.tar.gz gdb-1a3b5c34fe371f618402f811a981839c9191ff9f.tar.bz2 |
PR22220, BFD linker wrongly marks symbols as PREVAILING_DEF_IRONLY
non_ir_ref_dynamic wasn't being set in the case where we have a
versioned dynamic symbol definition with a non-versioned matching IR
symbol.
bfd/
PR 22220
* elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
a case where plugin_notice isn't called.
ld/
* testsuite/ld-plugin/pr22220.h,
* testsuite/ld-plugin/pr22220lib.cc,
* testsuite/ld-plugin/pr22220lib.ver,
* testsuite/ld-plugin/pr22220main.cc: New test.
* testsuite/ld-plugin/lto.exp: Run it.
Diffstat (limited to 'ld/testsuite/ld-plugin/lto.exp')
-rw-r--r-- | ld/testsuite/ld-plugin/lto.exp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp index f0bc345..6b7ad53 100644 --- a/ld/testsuite/ld-plugin/lto.exp +++ b/ld/testsuite/ld-plugin/lto.exp @@ -295,6 +295,12 @@ set lto_link_elf_tests [list \ [list "Build pr21382.so" \ "-shared" "-O2 -fpic" \ {pr21382b.c} {} "pr21382.so" "c"] \ + [list {Build pr22220lib.so} \ + {-shared -Wl,--version-script=pr22220lib.ver} {-fPIC} \ + {pr22220lib.cc} {} {pr22220lib.so} {c++}] \ + [list {Build pr22220main.o} \ + {} {-flto} \ + {pr22220main.cc} {} {} {c++}] \ ] # Check final symbols in executables. @@ -396,6 +402,12 @@ set lto_run_elf_shared_tests [list \ [list "Run pr21382" \ "-O2 -flto -fuse-linker-plugin -Wl,--as-needed tmpdir/pr21382a.o tmpdir/pr21382.so" "" \ {dummy.c} "pr21382.exe" "pass.out" "" "c"] \ + [list {pr22220a} \ + {-flto -fuse-linker-plugin tmpdir/pr22220main.o tmpdir/pr22220lib.so} {} \ + {dummy.c} {pr22220a.exe} {pass.out} {} {c++}] \ + [list {pr22220b} \ + {-flto -fuse-linker-plugin -Wl,--no-as-needed tmpdir/pr22220lib.so tmpdir/pr22220main.o} {} \ + {dummy.c} {pr22220b.exe} {pass.out} {} {c++}] \ ] # LTO run-time tests for ELF |