blob: 74579dc680a2005e3ffb739f355d7b46a4804d8c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
Hack from Debian to hopefully get sandbox working on mips
<`Kumba> ths: given the SHN_UNDEF thing is a hack, what's the preferred solution?
<ths> For fakeroot the simplest trigger is "fakeroot file /bin/ls".
<ths> `Kumba: I haven't found a better one yet.
<ths> Probably marker symbols around the stub section, and then exclude it from the link map.
<ths> This needs a ld change.
---
elf/do-lookup.h | 6 ++++++
1 file changed, 6 insertions(+)
Index: glibc-2.8-20080811/elf/do-lookup.h
===================================================================
--- glibc-2.8-20080811.orig/elf/do-lookup.h
+++ glibc-2.8-20080811/elf/do-lookup.h
@@ -246,6 +246,12 @@ do_lookup_x (const char *undef_name, uin
}
/* FALLTHROUGH */
case STB_GLOBAL:
+#ifdef __mips__
+ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF
+ symbols, we skip them. */
+ if (sym->st_shndx == SHN_UNDEF)
+ break;
+#endif
/* Global definition. Just what we need. */
result->s = sym;
result->m = (struct link_map *) map;
|