svn commit: r333461 - head/sys/amd64/amd64

Ed Maste emaste at freebsd.org
Fri May 11 02:17:27 UTC 2018


On 10 May 2018 at 15:38, Konstantin Belousov <kostikbel at gmail.com> wrote:
>
> Yes, I already noted and mjg noted that ifuncs are directed through PLT.
> I remember that it was not the case when I did it the first time, but then
> both compiler and linker were different.

I'm trying to find evidence of non-PLT ifuncs, but have been
unsuccessful so far.

>From ifunc.txt at https://sites.google.com/site/x32abi/documents:
| All references to a STT_GNU_IFUNC symbol, including function call and
| function pointer, will go through a PLT slot, which jumps to the address
| stored in the GOT entry.  If the STT_GNU_IFUNC symbol is locally defined,
| a R_*_IRELATIVE relocation will be applied to the GOT entry at load time.
| Otherwise, dynamic linker will lookup the symbol at the first call to the
| function and update the GOT entry. This applies to all usages of
| STT_GNU_IFUNC symbols in shared library, dynamic executable and static
| executable.


More information about the svn-src-head mailing list