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

--- Comment #4 from Thiago Macieira <thiago at kde dot org> ---
(In reply to H.J. Lu from comment #3)
> GOT relocation is needed for function pointer comparison.
> 
> > Either way, the fact that gold and ld.bfd behave different is a problem. And
> > so is the fact that passing an empty --dynamic-list file causes it to work.
> 
> An empty --dynamic-list file is the same as -Bsymbolic.

I see.

Then this is an incompatibility between compiler and linker: the compiler sees
a protected symbol and emits a relocation assuming it doesn't need indirect
access via the GOT to do a pointer comparison, but ld.bfd says it should.

Anyway, this is what I am asking to change: when a symbol is protected, the
compiler optimisation should be allowed and pointer comparison still works
provided ALL users use the GOT too. That includes the executable.

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

Reply via email to