bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/13600] protected visibility creates bogus relocation


From: rguenther at suse dot de
Subject: [Bug ld/13600] protected visibility creates bogus relocation
Date: Thu, 19 Jan 2012 12:04:23 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=13600

--- Comment #11 from rguenther at suse dot de 2012-01-19 12:04:23 UTC ---
On Thu, 19 Jan 2012, amodra at gmail dot com wrote:

> http://sourceware.org/bugzilla/show_bug.cgi?id=13600
> 
> --- Comment #10 from Alan Modra <amodra at gmail dot com> 2012-01-19 11:57:15 
> UTC ---
> That's why you make the address of foo the plt entry for foo in the 
> executable.

Well, if I put that constant into a shared library _and_ I put one into
the executable I'm still lost, no?

Btw, with -fPIC or -fPIE GCC puts the constants in .data.rel.ro
instead.

>  The address is fixed at link time.  However, it does mean that address of a
> default or protected visibility foo in a shared lib must have a relocation.

Which means a lost optimization (we need to go through the GOT here).

But well, I guess it's supposed to pay off in the executable which
requires only one relocation for each address-taken function.

Still, if GCC tells ld to resolve the address of a protected visibility
foo in a shared lib without a relocation why can't it simply do so
as surely it is techincally possible?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]