[PATCH] elf: Check multiple definition when defining hidden version

Alan Modra amodra@gmail.com
Fri Dec 4 00:22:04 GMT 2020


On Thu, Dec 03, 2020 at 05:10:51AM -0800, H.J. Lu wrote:
> What your patch does are
> 
> 1. Hide the weak foo@@v1.
> 2. Change the non-weak, hidden foo@v1 to the default foo@@v1.

Yes, and that is what gold does currently too.

> It is the opposite of what @@ and @ are supposed to do.  I believe we
> should reject such inputs.

It would seem that you and I have a slightly different idea of what @@
and @ mean.  I expect we'd agree on most of the normal use of symbol
versioning, but I don't see any reason to consider the result of my ld
fix the "opposite of what @@ and @ are supposed to do".  The mere fact
that you claim that makes me suspect you haven't spent much time
thinking about the problem.

So I'm going to commit my patch for this PR.

PS: For anyone reading this mailing list and wondering about versioned
symbols, I recommend Ian's excellent blog posts.  Searching
"site:airs.com symbol version" will give you more than one article
worth reading.

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list