yann@1625: Hack from Debian to hopefully get sandbox working on mips yann@1625: yann@1625: <`Kumba> ths: given the SHN_UNDEF thing is a hack, what's the preferred solution? yann@1625: For fakeroot the simplest trigger is "fakeroot file /bin/ls". yann@1625: `Kumba: I haven't found a better one yet. yann@1625: Probably marker symbols around the stub section, and then exclude it from the link map. yann@1625: This needs a ld change. yann@1625: yann@1625: diff -durN glibc-2.10.1.orig/elf/do-lookup.h glibc-2.10.1/elf/do-lookup.h yann@1625: --- glibc-2.10.1.orig/elf/do-lookup.h 2009-03-30 23:14:32.000000000 +0200 yann@1625: +++ glibc-2.10.1/elf/do-lookup.h 2009-11-13 00:51:36.000000000 +0100 yann@1625: @@ -248,6 +248,12 @@ yann@1625: } yann@1625: /* FALLTHROUGH */ yann@1625: case STB_GLOBAL: yann@1625: +#ifdef __mips__ yann@1625: + /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF yann@1625: + symbols, we skip them. */ yann@1625: + if (sym->st_shndx == SHN_UNDEF) yann@1625: + break; yann@1625: +#endif yann@1625: /* Global definition. Just what we need. */ yann@1625: result->s = sym; yann@1625: result->m = (struct link_map *) map;