bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/27210] ld: Don't suppress foo if foo@v1 is defined


From: i at maskray dot me
Subject: [Bug ld/27210] ld: Don't suppress foo if foo@v1 is defined
Date: Tue, 19 Jan 2021 23:36:03 +0000

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

--- Comment #2 from Fangrui Song <i at maskray dot me> ---
(In reply to H.J. Lu from comment #1)
> (In reply to Fangrui Song from comment #0)
> > cat > a.s <<eof
> > .globl foo
> > .symver foo, foo@v1
> > foo: nop
> > eof
> > echo 'v1 {};' > a.ver
> > cat > b.s <<eof
> > .globl  foo_v1
> > foo_v1: nop
> > .symver foo_v1, foo@v1
> > eof
> > 
> > exit
> > 
> > 
> > GNU ld has a special rule removing foo if foo@v1 is defined. gold and LLD
> 
> This is done on purpose. A single '@' defines a 'hidden' versioned symbol,
> which is intended for dynamic linker and shouldn't be used by ld to satisfy
> the unversioned reference.  ld behavior is correct.

I disagree. This interpretation does not explain why foo_v1 is not suppressed.

The special rule for foo should just be dropped.

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]