This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: Symbol visibility revised
> Basically, the function pointer should work as usual if there is
> only one definition of the STV_PROTECTED symbol.
In my patch, the function pointer works as you'd expect. I eliminate
relocations involving the PLT, not those involving the GOT. I said
this could be done, but I didn't do it. Now it seems it is not a good
idea to do it, but to rely on the dynamic linker for protected data
instead.
> Here is the testcase.
I can't see how this is relevant to protected symbols. I get failures
for bar and foobar. The bar failure is due to -Bsymbolic, not due to
.protected (at least under my current patch); removing -Bsymbolic
makes it pass. The foobar failure is not a failure at all: There are
two definitions of bar(), and the dynamic linker correctly choses the
one in the executable. The abort is because the one in the libfoo.so
is not called - but it should not be called, so the test case is
bogus.
Regards,
Martin