This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: A new visibility patch
> 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
patch to fix that, go ahead. After that change, I believe there is no
need for your current patches, anymore.
Regards,
Martin