Proposal for STT_GNU_IFUNC and R_*_IRELATIVE

Ulrich Drepper drepper@redhat.com
Fri Jun 5 05:26:00 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

H.J. Lu wrote:
> For branch, it is easy to understand. But it is unclear what the value
> of STT_GNU_IFUNC symbol should be. In a non-shared object, the value
> of the undefined STT_GNU_IFUNC symbol is the address of the PLT entry
> since it will only be resolved at run-time.

What undefined STT_GNU_IFUNC symbol?  The whole point of this symbol
type is that the caller doesn't have to care at all about the
optimizations.  A library author can introduce them in DSOs and programs
at the next start can take advantage of this.

Linking against an STT_GNU_IFUNC symbol in a DSO should create a normal
STT_FUNC symbol table entry for the undefined symbol.

Again, there are no undefined STT_GNU_IFUNC symbols.


> So the undefined STT_GNU_IFUNC symbol will have 2 different values.
> Will it be a problem?

See above.  If you linker patch creates undefined STT_GNU_IFUNC symbols,
take that code out.  That's the solution.

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

iEYEARECAAYFAkoorHkACgkQ2ijCOnn/RHSeHgCgtQgNxr3/FcEsGiMw2ZshnblY
1fwAoJo0zfcPBrzqHYR2EBuxBaZCA5mO
=dnZJ
-----END PGP SIGNATURE-----



More information about the Binutils mailing list