summaryrefslogtreecommitdiff
path: root/target/linux/patches/6.6.43/riscv-flat.patch
blob: b74f27e771941d9504328e66fd04b6a05d766cfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff -Nur linux-6.6.43.orig/fs/binfmt_flat.c linux-6.6.43/fs/binfmt_flat.c
--- linux-6.6.43.orig/fs/binfmt_flat.c	2024-07-27 11:34:11.000000000 +0200
+++ linux-6.6.43/fs/binfmt_flat.c	2024-08-09 09:34:47.857536277 +0200
@@ -72,8 +72,10 @@
 
 #ifdef CONFIG_BINFMT_FLAT_NO_DATA_START_OFFSET
 #define DATA_START_OFFSET_WORDS		(0)
+#define MAX_SHARED_LIBS_UPDATE		(0)
 #else
 #define DATA_START_OFFSET_WORDS		(MAX_SHARED_LIBS)
+#define MAX_SHARED_LIBS_UPDATE		(MAX_SHARED_LIBS)
 #endif
 
 struct lib_info {
@@ -880,7 +882,7 @@
 		return res;
 
 	/* Update data segment pointers for all libraries */
-	for (i = 0; i < MAX_SHARED_LIBS; i++) {
+	for (i = 0; i < MAX_SHARED_LIBS_UPDATE; i++) {
 		if (!libinfo.lib_list[i].loaded)
 			continue;
 		for (j = 0; j < MAX_SHARED_LIBS; j++) {