https://sourceware.org/bugzilla/show_bug.cgi?id=18703

--- Comment #10 from Cary Coutant <ccoutant at gmail dot com> ---
>> 0000000000000000 T foo
>> 0000000000000000 T foo@VERS_1.1
>>
>> With the version script, gold sees the first of those (plain "foo")
>> and makes it the default version (as, I think, it should). The second
>> one is just seen as a second declaration, but it's already been marked
>> the default.
>
> foo is versioned and only version specified is VERS_1.1, which is not
> default version.  It is wrong to create a default foo without being asked
> to do so.

In this example, "foo" is both unversioned and versioned. In response
to the unversioned one, gold is creating a default version, as
directed by the linker script. If "foo@VERS_1.1" were the only version
of "foo" in this file, gold would not make it a default version.

If you don't want a default version, get rid of the first,
unversioned, "foo", and gold will do what you expect.

I've played around with a bunch of different combinations, and I can't
even begin to unravel the logic behind Gnu ld's behavior when there
are multiple instances of versioned and unversioned symbols. I have no
desire to try to reproduce its behavior beyond what's described in the
documentation.

-cary

-- 
You are receiving this mail because:
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to