summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/eglibc/eglibc-2.15/relocatable_sdk.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/eglibc/eglibc-2.15/relocatable_sdk.patch')
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.15/relocatable_sdk.patch81
1 files changed, 0 insertions, 81 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-2.15/relocatable_sdk.patch b/meta/recipes-core/eglibc/eglibc-2.15/relocatable_sdk.patch
deleted file mode 100644
index 0ee25d60d7..0000000000
--- a/meta/recipes-core/eglibc/eglibc-2.15/relocatable_sdk.patch
+++ /dev/null
@@ -1,81 +0,0 @@
1Upstream-Status: Inappropriate [SDK specific]
2
3This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings
4and lengths as well as ld.so.cache path in the dynamic loader to specific
5sections in memory. The sections that contain paths have been allocated a 4096
6byte section, which is the maximum path length in linux. This will allow the
7relocating script to parse the ELF binary, detect the section and easily replace
8the strings in a certain path.
9
10Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
11
12Index: libc/elf/interp.c
13===================================================================
14--- libc.orig/elf/interp.c
15+++ libc/elf/interp.c
16@@ -17,5 +17,5 @@
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
19
20-const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp")))
21+const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp")))
22 = RUNTIME_LINKER;
23Index: libc/elf/dl-load.c
24===================================================================
25--- libc.orig/elf/dl-load.c
26+++ libc/elf/dl-load.c
27@@ -145,8 +145,8 @@ static size_t max_capstrlen attribute_re
28 /* Get the generated information about the trusted directories. */
29 #include "trusted-dirs.h"
30
31-static const char system_dirs[] = SYSTEM_DIRS;
32-static const size_t system_dirs_len[] =
33+static const char system_dirs[4096] __attribute__ ((section (".sysdirs"))) = SYSTEM_DIRS;
34+volatile static const size_t system_dirs_len[] __attribute__ ((section (".sysdirslen"))) =
35 {
36 SYSTEM_DIRS_LEN
37 };
38Index: libc/elf/dl-cache.c
39===================================================================
40--- libc.orig/elf/dl-cache.c
41+++ libc/elf/dl-cache.c
42@@ -134,6 +134,10 @@ do \
43 while (0)
44
45
46+const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache"))) =
47+ SYSCONFDIR "/ld.so.cache";
48+
49+
50 int
51 internal_function
52 _dl_cache_libcmp (const char *p1, const char *p2)
53Index: libc/elf/ldconfig.c
54===================================================================
55--- libc.orig/elf/ldconfig.c
56+++ libc/elf/ldconfig.c
57@@ -167,6 +167,9 @@ static struct argp argp =
58 options, parse_opt, NULL, doc, NULL, more_help, NULL
59 };
60
61+
62+extern const char LD_SO_CACHE[4096] __attribute__ ((section (".ldsocache")));
63+
64 /* Check if string corresponds to an important hardware capability or
65 a platform. */
66 static int
67Index: libc/sysdeps/generic/dl-cache.h
68===================================================================
69--- libc.orig/sysdeps/generic/dl-cache.h
70+++ libc/sysdeps/generic/dl-cache.h
71@@ -28,10 +28,6 @@
72 ((flags) == 1 || (flags) == _DL_CACHE_DEFAULT_ID)
73 #endif
74
75-#ifndef LD_SO_CACHE
76-# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache"
77-#endif
78-
79 #ifndef add_system_dir
80 # define add_system_dir(dir) add_dir (dir)
81 #endif