glibc/sysdeps
Szabolcs Nagy 2b8a3c86e7 aarch64: new ifunc resolver ABI
Passing a second argument to the ifunc resolver allows accessing
AT_HWCAP2 values from the resolver. AArch64 will start using AT_HWCAP2
on linux because for ilp32 to remain compatible with lp64 ABI no more
than 32bit hwcap flags can be in AT_HWCAP which is already used up.

Currently the relocation ordering logic does not guarantee that ifunc
resolvers can call libc apis or access libc objects, so only the
resolver arguments and runtime environment dependent instructions can
be used to do the dispatch (this affects ifunc resolvers outside of
the libc).

Since ifunc resolver is target specific and only supposed to be
called by the dynamic linker, the call ABI can be changed in a
backward compatible way:

Old call ABI passed hwcap as uint64_t, new abi sets the
_IFUNC_ARG_HWCAP flag in the hwcap and passes a second argument
that's a pointer to an extendible struct. A resolver has to check
the _IFUNC_ARG_HWCAP flag before accessing the second argument.

The new sys/ifunc.h installed header has the definitions for the
new ABI, everything is in the implementation reserved namespace.

An alternative approach is to try to support extern calls from ifunc
resolvers such as getauxval, but that seems non-trivial
https://sourceware.org/ml/libc-alpha/2017-01/msg00468.html

	* sysdeps/aarch64/Makefile: Install sys/ifunc.h and add tests.
	* sysdeps/aarch64/dl-irel.h (elf_ifunc_invoke): Update to new ABI.
	* sysdeps/aarch64/sys/ifunc.h: New file.
	* sysdeps/aarch64/tst-ifunc-arg-1.c: New file.
	* sysdeps/aarch64/tst-ifunc-arg-2.c: New file.
2019-07-04 11:13:32 +01:00
..
aarch64 aarch64: new ifunc resolver ABI 2019-07-04 11:13:32 +01:00
alpha alpha: Improve sysdeps/alpha/divqu.S and sysdeps/alpha/remqu.S 2019-04-01 16:00:37 +07:00
arm Break further lines before not after operators. 2019-02-26 15:01:50 +00:00
csky C-SKY: mark lr as undefined to stop unwinding 2019-03-11 09:51:14 +08:00
generic Add single-thread.h header 2019-05-14 08:41:15 -03:00
gnu Add UDP_GRO from Linux 5.0 to netinet/udp.h. 2019-03-25 13:16:46 +00:00
hppa Add some spaces before '('. 2019-02-27 13:55:45 +00:00
htl hurd: advertise *_setpshared as not supported 2019-01-02 22:21:34 +01:00
hurd Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
i386 x86: Add sysdeps/x86/dl-lookupcfg.h 2019-06-26 15:07:28 -07:00
ia64 Refactor hp-timing rtld usage 2019-03-22 17:30:44 -03:00
ieee754 math: Use wordsize-64 version for finite 2019-06-12 14:32:39 -03:00
init_array Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
m68k wcsmbs: optimize wcpcpy 2019-02-27 10:00:34 -03:00
mach misc: Add twalk_r function 2019-05-02 11:42:51 +02:00
microblaze Break more lines before not after operators. 2019-02-25 13:19:19 +00:00
mips Add and move fall-through comments in system-specific code. 2019-02-26 02:09:18 +00:00
nios2 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
nptl x86: Remove arch-specific low level lock implementation 2019-05-14 08:48:02 -03:00
posix nss: Turn __nss_database_lookup into a compatibility symbol 2019-05-15 15:07:49 +02:00
powerpc powerpc: Use faster means to access FPSCR when possible in some cases 2019-06-30 08:40:44 -03:00
pthread <semaphore.h>: Add nonnull attributes 2019-04-29 10:11:35 +02:00
riscv riscv: remove DL_RO_DYN_SECTION 2019-04-25 10:53:08 -07:00
s390 S390: Regenerate ULPs. 2019-06-25 15:14:17 +02:00
sh Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
sparc Refactor hp-timing rtld usage 2019-03-22 17:30:44 -03:00
unix nptl: Remove vfork IFUNC-based forwarder from libpthread [BZ #20188] 2019-07-02 16:51:13 +02:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
wordsize-64 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
x86 Call _dl_open_check after relocation [BZ #24259] 2019-07-01 12:23:22 -07:00
x86_64 x86: Add sysdeps/x86/dl-lookupcfg.h 2019-06-26 15:07:28 -07:00