1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/glibc/ports-2.12.1/630-mips_shn_undef-hack.patch Mon Nov 19 11:19:54 2012 +0100
1.3 @@ -0,0 +1,16 @@
1.4 +diff -durN glibc-2.12.1.orig/elf/dl-lookup.c glibc-2.12.1/elf/dl-lookup.c
1.5 +--- glibc-2.12.1.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200
1.6 ++++ glibc-2.12.1/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100
1.7 +@@ -301,6 +301,12 @@
1.8 + /* FALLTHROUGH */
1.9 + case STB_GLOBAL:
1.10 + success:
1.11 ++#ifdef __mips__
1.12 ++ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF
1.13 ++ symbols, we skip them. */
1.14 ++ if (sym->st_shndx == SHN_UNDEF)
1.15 ++ break;
1.16 ++#endif
1.17 + /* Global definition. Just what we need. */
1.18 + result->s = sym;
1.19 + result->m = (struct link_map *) map;