This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] S/390: STT_GNU_IFUNC support
On 07/02/2012 03:39 PM, H.J. Lu wrote:
> On Mon, Jul 2, 2012 at 3:00 AM, Andreas Krebbel
> <email@example.com> wrote:
>> the attached patch implements support for STT_GNU_IFUNC for s390 and
>> To big parts I've tried to copy the x86 approach except the following
>> - PLT infos for local IFUNC symbols is stored in the target specific
>> data area for an object file (elf_obj_tdata).
>> - The iplt section is also used for dynamic linking in order to keep
>> all the IFUNC related relocations together at the end of the
>> rela.plt to avoid the problem described in BZ13302
>> - On x86 for a non-PIE executable an error is reported when an ifunc
>> symbol in the executable is referenced by a shared lib. For S/390
>> the ifunc symbol in the main executable is turned into a normal
>> STT_FUNC symbol pointing to the PLT slot of the IFUNC symbol.
> What happens to IFUNC function in exectuables? If it is
> turned into FUNC symbol, won't you get wrong value since
> for IFUNC symbol, its real value is the return value of
> the IFUNC function at run-time?
The IFUNC symbols defined in the executable will all be resolved by _IRELATIVE relocs. For
those it doesn't matter whether the symbol is actually an STT_GNU_IFUNC symbol or not.
> BTW, did your glibc patch passes all IFUNC tests?
Yes. It passes all glibc tests on s390 and s390x.