|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
- if (elf_tdata (abfd)->verdef != NULL
+ if (h->versioned != unversioned
+ && elf_tdata (abfd)->verdef != NULL
&& vernum > 1
&& definition)
h->verinfo.verdef = &elf_tdata (abfd)->verdef[vernum - 1];
--- /dev/null
+#ld: -shared
+#readelf: --dyn-syms --wide
+#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
+#xfail: ![check_shared_lib_support]
+
+#...
+ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +WEAK +DEFAULT (\[NOPV\]|) +[0-9]+ +_?foo
+#pass
{} \
"pr26590" \
] \
+ [list \
+ "Build libpr28348a.so" \
+ "-shared -Wl,--version-script=pr28348.t" \
+ "-fPIC" \
+ {pr28348a.c} \
+ {} \
+ "libpr28348a.so" \
+ ] \
+ [list \
+ "Build pr28348b.o" \
+ "" \
+ "-fPIC" \
+ {pr28348b.c} \
+ ] \
+ [list \
+ "Build pr28348c.o" \
+ "" \
+ "" \
+ {pr28348c.c} \
+ ] \
+ [list \
+ "Build libpr28348b.so" \
+ "-shared -Wl,--version-script=pr28348.t \
+ -Wl,--no-as-needed tmpdir/pr28348b.o tmpdir/libpr28348a.so" \
+ "-fPIC" \
+ {dummy.c} \
+ {} \
+ "libpr28348b.so" \
+ ] \
+ [list \
+ "Build pr28348" \
+ "-Wl,--no-as-needed tmpdir/pr28348c.o \
+ tmpdir/pr28348a.o tmpdir/libpr28348a.so tmpdir/libpr28348b.so \
+ tmpdir/libpr28348a.so" \
+ "" \
+ {dummy.c} \
+ {{readelf {--dyn-syms --wide} pr28348.rd}} \
+ "pr28348" \
+ ] \
]
# pr19073.s uses .set, which has a different meaning on alpha.