diff options
Diffstat (limited to 'patches/glibc-2.8/generic/gentoo/6645_all_glibc-mips_shn_undef-hack.patch')
-rw-r--r-- | patches/glibc-2.8/generic/gentoo/6645_all_glibc-mips_shn_undef-hack.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/patches/glibc-2.8/generic/gentoo/6645_all_glibc-mips_shn_undef-hack.patch b/patches/glibc-2.8/generic/gentoo/6645_all_glibc-mips_shn_undef-hack.patch new file mode 100644 index 0000000..74579dc --- /dev/null +++ b/patches/glibc-2.8/generic/gentoo/6645_all_glibc-mips_shn_undef-hack.patch @@ -0,0 +1,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; |