[PATCH] S/390: STT_GNU_IFUNC support

H.J. Lu hjl.tools@gmail.com
Mon Jul 2 13:39:00 GMT 2012


On Mon, Jul 2, 2012 at 3:00 AM, Andreas Krebbel
<krebbel@linux.vnet.ibm.com> wrote:
> Hi,
>
> the attached patch implements support for STT_GNU_IFUNC for s390 and
> s390x.
>
> To big parts I've tried to copy the x86 approach except the following
> things:
>
> - 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?

BTW, did your glibc patch passes all IFUNC tests?

H.J.



More information about the Binutils mailing list