From fc60e000169618a4adced845b9462d36ced1efdd Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Thu, 14 Oct 2021 15:57:36 +0800 Subject: [PATCH] nativesdk-libcap: Raise the size of arrays containing dl paths This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings and lengths as well as ld.so.cache path in the dynamic loader to specific sections in memory. The sections that contain paths have been allocated a 4096 byte section, which is the maximum path length in linux. This will allow the relocating script to parse the ELF binary, detect the section and easily replace the strings in a certain path. Upstream-Status: Inappropriate [SDK specific] Signed-off-by: Hongxu Jia --- libcap/execable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcap/execable.h b/libcap/execable.h index fee17b4..5bb0c55 100644 --- a/libcap/execable.h +++ b/libcap/execable.h @@ -23,7 +23,7 @@ #endif #define __EXECABLE_H -const char __execable_dl_loader[] __attribute((section(".interp"))) = +const char __execable_dl_loader[4096] __attribute((section(".interp"))) = SHARED_LOADER ; static void __execable_parse_args(int *argc_p, char ***argv_p)