rtld: Handle IFUNC symbols at non-PLT relocations
authorJohn Marino <draco@marino.st>
Sun, 30 Nov 2014 15:48:25 +0000 (16:48 +0100)
committerJohn Marino <draco@marino.st>
Sun, 30 Nov 2014 16:50:50 +0000 (17:50 +0100)
commitff452243b78f779a7264d7443795005236f6950e
tree96d6f6a5ec0ba03b16d909c49a304435a4ef8980
parent98e4cb42ffdf7b36598968a5e31d50c4a1ca73f9
rtld: Handle IFUNC symbols at non-PLT relocations

An example of this is initializing a global variable with a pointer to
ifunc.  This adds a symble type check and call resolver for STT_GNU_IFNC
symbol types whien processing non-PLT relocations, but only after
non-IFUNC relocations are done.  The two-phase processing is required
since resolvers may reference other symbols which most be ready to use
when resolver calls are done.

This restructures reloc_non_plt() to call find_symdef() and handle IFUNC
in a single place.

Taken from: FreeBSD svn 270798 (29 Aug 2014)
FreeBSD svn 270802 (29 Aug 2014)
libexec/rtld-elf/i386/reloc.c
libexec/rtld-elf/rtld.c
libexec/rtld-elf/rtld.h
libexec/rtld-elf/x86_64/reloc.c