A new visibility patch
H . J . Lu
hjl@lucon.org
Mon May 22 10:13:00 GMT 2000
On Mon, May 22, 2000 at 06:39:20PM +0200, Martin von Loewis wrote:
> > I am working on STV_PROTECTED for glibc 2.2. Without my patch, the
> > undefined symbol is marked as STV_PROTECTED if it is marked
> > STV_PROTECTED in library. It doesn't make any senses and causes
> > problems for the dynamic linker.
>
> I see. Re-reading the draft, I just noticed
>
> # First, all of the non-default visibility attributes, when applied to
> # a symbol reference, imply that a definition to satisfy that
> # reference must be provided within the current executable or shared
> # object. If such a symbol reference has no definition within the
> # component being linked, then the reference must have STB_WEAK
> # binding and is resolved to zero.
>
> So it is an error to end up with no definition even for a protected
> symbol - at a minimum, you have to have a weak definition, which is
> then resolved in the component, to a value of zero.
>
> I believe binutils currently gets this wrong - if you can produce a
I will give it a try. I will add some more test cases to binutils
at the same time.
> patch to fix that, go ahead. After that change, I believe there is no
> need for your current patches, anymore.
I still think the visibility bits should be cleared for undefined
symbols.
H.J.
More information about the Binutils
mailing list