This is the mail archive of the
mailing list for the binutils project.
Re: [committed, PATCH] x86: Properly check building shared library
- From: Cary Coutant <ccoutant at gmail dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, Binutils <binutils at sourceware dot org>
- Date: Tue, 13 Feb 2018 22:20:43 -0800
- Subject: Re: [committed, PATCH] x86: Properly check building shared library
- Authentication-results: sourceware.org; auth=none
- References: <20180213223129.GA30801@gmail.com> <20180214021119.GI30218@bubble.grove.modra.org>
> 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.
I, for one, think it is not necessary, as anywhere it's valid to treat
the PC32 reloc as if it were a PLT32 reloc, the compiler or assembler
could (and should) have simply used a PLT32 reloc. I think it's
dangerous to simply assume that it's always valid to redirect any
arbitrary PC32 reloc to a PLT entry. There's a reason these are two
I also think this is likely to be unique to the x86 architecture.