This is the mail archive of the
mailing list for the binutils project.
Re: DT_TEXTREL vs IFUNC
On Sat, Mar 18, 2017 at 10:03:14AM +0100, Andreas Schwab wrote:
> On Mär 18 2017, Alan Modra <email@example.com> wrote:
> > This patch teaches PowerPC ld to detect the situation, and warn.
> Isn't that a generic problem?
Indeed, but other target's ifunc handling code is quite different to
PowerPC. I'm leaving it to the various port maintainers to
implement, if they consider it important.
Note that the likelihood of hitting this problem depends on the target
support for non-PIC in PIEs or shared libraries. On PowerPC64 we can
do that. On x86_64 you typically get "relocation R_X86_64_32 ... can
not be used when making a shared object". (One of the reasons that
PowerPC64 supports non-PIC is that the code itself is always PIC.
However, we still get TEXTREL due to relocations in .rodata, part of
the text segment.)
I haven't yet implemented the checks in gold for PowerPC because the
usual way this situation arises is when someone accidentally specifies
both -static and -pie, or -static and -shared. Gold errors on those
Australia Development Lab, IBM