arm "neon"

David Miller davem at
Tue Jan 15 08:51:23 CET 2013

From: nisse at (Niels Möller)
Date: Tue, 15 Jan 2013 08:28:07 +0100

> From my admittedly limited understanding of ELF linking, I think it has
> to be done a bit differently if we update the pointers directly in the
> PLT. For one, iirc, each shared library has its own PLT for the
> functions it calls, right? So if you dynamically load another shared
> library using GMP, you get a new table of PLT pointers to be updated
> (and with IFUNC, they'll be updated on first call). Right?

IFUNC doesn't update the pointers in the PLT, the dynamic
linker does, as it always would.

When you call, let's say 'memcpy', in glibc it calls a function
that returns the address of, say, __memcpy_sse2.  And __memcpy_sse2
is what the dynamic linker uses to resolve the PLT entry.

You could do whatever you want in that function before returning
the pointer to the routine, for example you could setup the
multiply implementation cutoff values if they haven't been setup

Each and every PLT entry in an application, or other shared library,
for GMP entry points needs to be resolved by the dynamic linker

> I hope you understand that switching to IFUNC exclusively is not an
> option:

I never suggested it would be.

More information about the gmp-devel mailing list