summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libcap/files/0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/libcap/files/0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch')
-rw-r--r--meta/recipes-support/libcap/files/0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-support/libcap/files/0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch b/meta/recipes-support/libcap/files/0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch
new file mode 100644
index 0000000000..2cec20b4b1
--- /dev/null
+++ b/meta/recipes-support/libcap/files/0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch
@@ -0,0 +1,33 @@
1From 969d21aa2bf474d9c5c80a64de1a9fe0e17e31b2 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Thu, 14 Oct 2021 15:57:36 +0800
4Subject: [PATCH] nativesdk-libcap: Raise the size of arrays containing dl
5 paths
6
7This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings
8and lengths as well as ld.so.cache path in the dynamic loader to specific
9sections in memory. The sections that contain paths have been allocated a 4096
10byte section, which is the maximum path length in linux. This will allow the
11relocating script to parse the ELF binary, detect the section and easily replace
12the strings in a certain path.
13
14Upstream-Status: Inappropriate [SDK specific]
15
16Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
17---
18 libcap/execable.h | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/libcap/execable.h b/libcap/execable.h
22index a68ea24..60d3853 100644
23--- a/libcap/execable.h
24+++ b/libcap/execable.h
25@@ -34,7 +34,7 @@ extern const int _IO_stdin_used;
26 const int _IO_stdin_used __attribute__((weak)) = 131073;
27 #endif /* def __GLIBC__ */
28
29-const char __execable_dl_loader[] __attribute((section(".interp"))) =
30+const char __execable_dl_loader[4096] __attribute((section(".interp"))) =
31 SHARED_LOADER ;
32
33 static void __execable_parse_args(int *argc_p, char ***argv_p)