summaryrefslogtreecommitdiff
path: root/patches/glibc/ports-2.10.1/630-mips_shn_undef-hack.patch
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-11-13 20:37:18 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-11-13 20:37:18 (GMT)
commit4b173045e97ab47f92bc27e9bef3a04f5742b263 (patch)
tree5c907ac100fc957240f4936d58c16a26554cfcdf /patches/glibc/ports-2.10.1/630-mips_shn_undef-hack.patch
parent590ca63f0dc6a548e2254d71b065efbf38ed85d8 (diff)
libc/glibc: add 2.10.1
Woo... It seems the glibc guys finally decided that tarballs were not deprecated, in fact. The patchset was vampirised from Gentoo (kudos, guys!), and applies to glibc+ports, so that's why it's been added as a patchset against ports, not against glibc.
Diffstat (limited to 'patches/glibc/ports-2.10.1/630-mips_shn_undef-hack.patch')
-rw-r--r--patches/glibc/ports-2.10.1/630-mips_shn_undef-hack.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/patches/glibc/ports-2.10.1/630-mips_shn_undef-hack.patch b/patches/glibc/ports-2.10.1/630-mips_shn_undef-hack.patch
new file mode 100644
index 0000000..13f0ee8
--- /dev/null
+++ b/patches/glibc/ports-2.10.1/630-mips_shn_undef-hack.patch
@@ -0,0 +1,24 @@
+ 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;