From 3a36a3100af2ee1cca69345af83228757e8c55fe Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Mon, 15 Apr 2024 15:31:58 +0300 Subject: Fix vDSO support for all supported architectures. - Cleanup dl-vdso.c code. - Pass `void *` as first arg to `load_vdso()`, using 32-bit type is completely wrong on 64bit architectures. - Split libc code and vDSO-related code. Move arch-specific implementations into separate files. The performance improvement is for example 50-60 times on ARMv7 and about 4 times on x86_64. Signed-off-by: Dmitry Chestnykh --- ldso/include/dl-syscall.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ldso/include/dl-syscall.h') diff --git a/ldso/include/dl-syscall.h b/ldso/include/dl-syscall.h index b40f58b10..4f41034ad 100644 --- a/ldso/include/dl-syscall.h +++ b/ldso/include/dl-syscall.h @@ -11,8 +11,11 @@ * been dynamicly linked in yet. */ #include "sys/syscall.h" extern int _dl_errno; + +#ifdef UCLIBC_LDSO #undef __set_errno #define __set_errno(X) {(_dl_errno) = (X);} +#endif /* Pull in the arch specific syscall implementation */ #include -- cgit v1.2.3