Skip to content
Commit 8cf12fd3 authored by Maciej W. Rozycki's avatar Maciej W. Rozycki
Browse files

Solaris2/LD: Fix anonymous version script acceptance bug

Correct a bug in Solaris 2 linker emulation code triggered by a test
introduced with commit 81ff47b3 ("PR ld/20828: Fix linker script
symbols wrongly forced local with section GC") and only create implicit
version nodes if versioning is actually introduced with a version script
(or VERSION command) rather than only global vs local symbol visibility
selected, fixing an:

ld: anonymous version tag cannot be combined with other version tags

linker error produced whenever a version script (or VERSION command) is
used that does not assign symbol versions, such as:

{ global: foo; bar; local: *; };

and consequently removing a:

FAIL: PR ld/20828 dynamic symbols with section GC (version script)

test suite failure with the `x86_64-solaris2' target.

	ld/
	* emultempl/solaris2.em (elf_solaris2_before_allocation): Do not
	add implicit version nodes if an anonymous version tag is being
	used.

(cherry picked from commit 1a792e1c)
parent 3c35b49e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment