Skip to content

Commit bb6b64c

Browse files
liblol: glibc: also add syscall fallback for fstatat
1 parent 082dfb2 commit bb6b64c

7 files changed

+29
-8
lines changed

autobuild/patches/glibc/0006-add-syscall-fallback-for-stat-at.patch

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,42 @@
1-
From e7fed5998191299cae27212dbabdaad6170cf32b Mon Sep 17 00:00:00 2001
1+
From 58396f14b1732fd25cb4ad965a9353f48e1b97f7 Mon Sep 17 00:00:00 2001
22
From: Miao Wang <shankerwangmiao@gmail.com>
33
Date: Sun, 14 Jan 2024 15:51:49 +0800
44
Subject: [PATCH 06/10] add syscall fallback for *stat(at)?
55

66
---
7+
sysdeps/unix/sysv/linux/loongarch/fstatat64.c | 13 ++++
78
sysdeps/unix/sysv/linux/loongarch/fxstat64.c | 67 ++++++++++++++++
89
.../unix/sysv/linux/loongarch/fxstatat64.c | 61 +++++++++++++++
910
sysdeps/unix/sysv/linux/loongarch/lxstat64.c | 77 +++++++++++++++++++
1011
.../unix/sysv/linux/loongarch/ow_syscall_nr.h | 2 +
1112
sysdeps/unix/sysv/linux/loongarch/xstat64.c | 71 +++++++++++++++++
12-
5 files changed, 278 insertions(+)
13+
6 files changed, 291 insertions(+)
14+
create mode 100644 sysdeps/unix/sysv/linux/loongarch/fstatat64.c
1315
create mode 100644 sysdeps/unix/sysv/linux/loongarch/fxstat64.c
1416
create mode 100644 sysdeps/unix/sysv/linux/loongarch/fxstatat64.c
1517
create mode 100644 sysdeps/unix/sysv/linux/loongarch/lxstat64.c
1618
create mode 100644 sysdeps/unix/sysv/linux/loongarch/ow_syscall_nr.h
1719
create mode 100644 sysdeps/unix/sysv/linux/loongarch/xstat64.c
1820

21+
diff --git a/sysdeps/unix/sysv/linux/loongarch/fstatat64.c b/sysdeps/unix/sysv/linux/loongarch/fstatat64.c
22+
new file mode 100644
23+
index 00000000..a437eeaa
24+
--- /dev/null
25+
+++ b/sysdeps/unix/sysv/linux/loongarch/fstatat64.c
26+
@@ -0,0 +1,13 @@
27+
+#include <shlib-compat.h>
28+
+
29+
+#if LIB_COMPAT(libc, GLIBC_2_27, GLIBC_2_36)
30+
+# include <kernel-features.h>
31+
+# ifdef __ASSUME_STATX
32+
+# undef __ASSUME_STATX
33+
+# endif
34+
+// Hack: force use statx for fstatat64 even __NR_newfstatat is available
35+
+# define STAT_HAS_TIME32
36+
+# include "ow_syscall_nr.h"
37+
+#endif
38+
+
39+
+#include <sysdeps/unix/sysv/linux/fstatat64.c>
1940
diff --git a/sysdeps/unix/sysv/linux/loongarch/fxstat64.c b/sysdeps/unix/sysv/linux/loongarch/fxstat64.c
2041
new file mode 100644
2142
index 00000000..f7174ea8

autobuild/patches/glibc/0007-add-more-pthread-symbols.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From f22c7bed96eb4dc0bd138a4fa5038051e1ba2dde Mon Sep 17 00:00:00 2001
1+
From 6b633be48edaedf1337da787a8da18eec0f0b151 Mon Sep 17 00:00:00 2001
22
From: Miao Wang <shankerwangmiao@gmail.com>
33
Date: Sun, 14 Jan 2024 08:41:15 +0800
44
Subject: [PATCH 07/10] add more pthread symbols

autobuild/patches/glibc/0008-remove-clone3-for-compatibility-with-qq.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 969d0d76736352678115dd2a87224e2470ff11f9 Mon Sep 17 00:00:00 2001
1+
From fdc90d7c81ac8801f9fe678adc6c0c5af83530b5 Mon Sep 17 00:00:00 2001
22
From: Miao Wang <shankerwangmiao@gmail.com>
33
Date: Sun, 14 Jan 2024 16:51:44 +0800
44
Subject: [PATCH 08/10] remove clone3 for compatibility with qq

autobuild/patches/glibc/0009-prepend-trusted-dirs.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 033767c6d267222851a27169e052583b1a40d9e3 Mon Sep 17 00:00:00 2001
1+
From 8cbd2273506313f5eb287f97b657205fccb808cd Mon Sep 17 00:00:00 2001
22
From: Miao Wang <shankerwangmiao@gmail.com>
33
Date: Sun, 14 Jan 2024 13:28:41 +0800
44
Subject: [PATCH 09/10] prepend trusted-dirs

autobuild/patches/glibc/0010-Add-___brk_addr-symbol.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From dae8180d9f7d8b2e8e0b05dc67d436acd8bf126e Mon Sep 17 00:00:00 2001
1+
From e520fa5aa05742d27d6e45b3187f179475e43b5f Mon Sep 17 00:00:00 2001
22
From: Miao Wang <shankerwangmiao@gmail.com>
33
Date: Mon, 15 Jan 2024 04:16:47 +0800
44
Subject: [PATCH 10/10] Add ___brk_addr symbol

spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AUTOGENERATED FILE from spec.main using genspec
2-
VER=0.1.4~pre3
2+
VER=0.1.4~pre4
33
_mirror="http://pkg.loongnix.cn/loongnix"
44
__GLIBC_VER=2.38
55

spec.main

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VER=0.1.4~pre3
1+
VER=0.1.4~pre4
22
_mirror="http://pkg.loongnix.cn/loongnix"
33
__GLIBC_VER=2.38
44

0 commit comments

Comments
 (0)