This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: PATCH: Make STT_GNU_IFUNC symbol dynamic


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

H.J. Lu wrote:
> Which tool will generate the new relocation? Will it be internal to linker.

The code the compiler generates contains ordinary calls.  The assembler
will have to refrain from optimizing calls to static IFUNC functions.
But the real logic is entirely internal to the static linker.  For every
local IFUNC symbol create a PLT slot.  This slot has no global symbol
attached and the relocation should be R_*_IRELATIVE (my proposed name).
 This relocation works like a R_*_RELATIVE relocation but it uses the
return value as for SHT_GNU_IFUNC symbols.  The reason we need such a
relocation is that we have no symbol at runtime.  We cannot use a normal
PLT slot relocation since this would perform a global name lookup, which
is wrong.  The R_*_IRELATIVE relocation is also more efficient.

Shouldn't be hard to implement in the linker and assembler.

- --
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkoYbiIACgkQ2ijCOnn/RHQqMwCfVkia0z2AfZBwLVjLzjMhio4e
lAIAoJSKR8cF5V99HrhvSk38P2qDMCB7
=zM1Q
-----END PGP SIGNATURE-----


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