mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-29 17:18:53 +00:00
25 lines
973 B
Diff
25 lines
973 B
Diff
|
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.
|
||
|
|
||
|
diff -durN glibc-2.10.1.orig/elf/do-lookup.h glibc-2.10.1/elf/do-lookup.h
|
||
|
--- glibc-2.10.1.orig/elf/do-lookup.h 2009-03-30 23:14:32.000000000 +0200
|
||
|
+++ glibc-2.10.1/elf/do-lookup.h 2009-11-13 00:51:36.000000000 +0100
|
||
|
@@ -248,6 +248,12 @@
|
||
|
}
|
||
|
/* 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;
|