This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]