[committed, PATCH] x86: Properly check building shared library

Alan Modra amodra@gmail.com
Wed Feb 14 02:11:00 GMT 2018


On Tue, Feb 13, 2018 at 02:31:43PM -0800, H.J. Lu wrote:
> If a symbol is not defined in a regular file, and we are not generating
> a shared library, then set the symbol to its location in the .plt.  This
> is required to make function pointers compare as equal between the normal
> executable and the shared library.

I'm curious as to why this is necessary, in case other targets need
the same treatment.  Normally a PIE is built from position independent
code, and thus addresses of functions are loaded from the GOT.  That
means there is no need to use any tricks to avoid dynamic text relocs.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list