From bb6b64c1102b03e487a3a92645181cc20752da23 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Tue, 20 Feb 2024 15:22:50 +0800 Subject: [PATCH] liblol: glibc: also add syscall fallback for fstatat --- ...006-add-syscall-fallback-for-stat-at.patch | 25 +++++++++++++++++-- .../glibc/0007-add-more-pthread-symbols.patch | 2 +- ...ove-clone3-for-compatibility-with-qq.patch | 2 +- .../glibc/0009-prepend-trusted-dirs.patch | 2 +- .../glibc/0010-Add-___brk_addr-symbol.patch | 2 +- spec | 2 +- spec.main | 2 +- 7 files changed, 29 insertions(+), 8 deletions(-) diff --git a/autobuild/patches/glibc/0006-add-syscall-fallback-for-stat-at.patch b/autobuild/patches/glibc/0006-add-syscall-fallback-for-stat-at.patch index 65ad873..7ceb213 100644 --- a/autobuild/patches/glibc/0006-add-syscall-fallback-for-stat-at.patch +++ b/autobuild/patches/glibc/0006-add-syscall-fallback-for-stat-at.patch @@ -1,21 +1,42 @@ -From e7fed5998191299cae27212dbabdaad6170cf32b Mon Sep 17 00:00:00 2001 +From 58396f14b1732fd25cb4ad965a9353f48e1b97f7 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sun, 14 Jan 2024 15:51:49 +0800 Subject: [PATCH 06/10] add syscall fallback for *stat(at)? --- + sysdeps/unix/sysv/linux/loongarch/fstatat64.c | 13 ++++ sysdeps/unix/sysv/linux/loongarch/fxstat64.c | 67 ++++++++++++++++ .../unix/sysv/linux/loongarch/fxstatat64.c | 61 +++++++++++++++ sysdeps/unix/sysv/linux/loongarch/lxstat64.c | 77 +++++++++++++++++++ .../unix/sysv/linux/loongarch/ow_syscall_nr.h | 2 + sysdeps/unix/sysv/linux/loongarch/xstat64.c | 71 +++++++++++++++++ - 5 files changed, 278 insertions(+) + 6 files changed, 291 insertions(+) + create mode 100644 sysdeps/unix/sysv/linux/loongarch/fstatat64.c create mode 100644 sysdeps/unix/sysv/linux/loongarch/fxstat64.c create mode 100644 sysdeps/unix/sysv/linux/loongarch/fxstatat64.c create mode 100644 sysdeps/unix/sysv/linux/loongarch/lxstat64.c create mode 100644 sysdeps/unix/sysv/linux/loongarch/ow_syscall_nr.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/xstat64.c +diff --git a/sysdeps/unix/sysv/linux/loongarch/fstatat64.c b/sysdeps/unix/sysv/linux/loongarch/fstatat64.c +new file mode 100644 +index 00000000..a437eeaa +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/loongarch/fstatat64.c +@@ -0,0 +1,13 @@ ++#include ++ ++#if LIB_COMPAT(libc, GLIBC_2_27, GLIBC_2_36) ++# include ++# ifdef __ASSUME_STATX ++# undef __ASSUME_STATX ++# endif ++// Hack: force use statx for fstatat64 even __NR_newfstatat is available ++# define STAT_HAS_TIME32 ++# include "ow_syscall_nr.h" ++#endif ++ ++#include diff --git a/sysdeps/unix/sysv/linux/loongarch/fxstat64.c b/sysdeps/unix/sysv/linux/loongarch/fxstat64.c new file mode 100644 index 00000000..f7174ea8 diff --git a/autobuild/patches/glibc/0007-add-more-pthread-symbols.patch b/autobuild/patches/glibc/0007-add-more-pthread-symbols.patch index fbe1603..52b0f0a 100644 --- a/autobuild/patches/glibc/0007-add-more-pthread-symbols.patch +++ b/autobuild/patches/glibc/0007-add-more-pthread-symbols.patch @@ -1,4 +1,4 @@ -From f22c7bed96eb4dc0bd138a4fa5038051e1ba2dde Mon Sep 17 00:00:00 2001 +From 6b633be48edaedf1337da787a8da18eec0f0b151 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sun, 14 Jan 2024 08:41:15 +0800 Subject: [PATCH 07/10] add more pthread symbols diff --git a/autobuild/patches/glibc/0008-remove-clone3-for-compatibility-with-qq.patch b/autobuild/patches/glibc/0008-remove-clone3-for-compatibility-with-qq.patch index 767264d..ccd17d5 100644 --- a/autobuild/patches/glibc/0008-remove-clone3-for-compatibility-with-qq.patch +++ b/autobuild/patches/glibc/0008-remove-clone3-for-compatibility-with-qq.patch @@ -1,4 +1,4 @@ -From 969d0d76736352678115dd2a87224e2470ff11f9 Mon Sep 17 00:00:00 2001 +From fdc90d7c81ac8801f9fe678adc6c0c5af83530b5 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sun, 14 Jan 2024 16:51:44 +0800 Subject: [PATCH 08/10] remove clone3 for compatibility with qq diff --git a/autobuild/patches/glibc/0009-prepend-trusted-dirs.patch b/autobuild/patches/glibc/0009-prepend-trusted-dirs.patch index 22fbb0a..146b893 100644 --- a/autobuild/patches/glibc/0009-prepend-trusted-dirs.patch +++ b/autobuild/patches/glibc/0009-prepend-trusted-dirs.patch @@ -1,4 +1,4 @@ -From 033767c6d267222851a27169e052583b1a40d9e3 Mon Sep 17 00:00:00 2001 +From 8cbd2273506313f5eb287f97b657205fccb808cd Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sun, 14 Jan 2024 13:28:41 +0800 Subject: [PATCH 09/10] prepend trusted-dirs diff --git a/autobuild/patches/glibc/0010-Add-___brk_addr-symbol.patch b/autobuild/patches/glibc/0010-Add-___brk_addr-symbol.patch index 4bfa417..aae3ee9 100644 --- a/autobuild/patches/glibc/0010-Add-___brk_addr-symbol.patch +++ b/autobuild/patches/glibc/0010-Add-___brk_addr-symbol.patch @@ -1,4 +1,4 @@ -From dae8180d9f7d8b2e8e0b05dc67d436acd8bf126e Mon Sep 17 00:00:00 2001 +From e520fa5aa05742d27d6e45b3187f179475e43b5f Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Mon, 15 Jan 2024 04:16:47 +0800 Subject: [PATCH 10/10] Add ___brk_addr symbol diff --git a/spec b/spec index 5412b8c..248be21 100644 --- a/spec +++ b/spec @@ -1,5 +1,5 @@ # AUTOGENERATED FILE from spec.main using genspec -VER=0.1.4~pre3 +VER=0.1.4~pre4 _mirror="http://pkg.loongnix.cn/loongnix" __GLIBC_VER=2.38 diff --git a/spec.main b/spec.main index 7991b1a..8a3cddb 100644 --- a/spec.main +++ b/spec.main @@ -1,4 +1,4 @@ -VER=0.1.4~pre3 +VER=0.1.4~pre4 _mirror="http://pkg.loongnix.cn/loongnix" __GLIBC_VER=2.38