aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/libc0.9.32/0001-ldd-segfault-fix.patch49
-rw-r--r--main/libc0.9.32/APKBUILD4
2 files changed, 52 insertions, 1 deletions
diff --git a/main/libc0.9.32/0001-ldd-segfault-fix.patch b/main/libc0.9.32/0001-ldd-segfault-fix.patch
new file mode 100644
index 0000000000..4384fa548c
--- /dev/null
+++ b/main/libc0.9.32/0001-ldd-segfault-fix.patch
@@ -0,0 +1,49 @@
+From f29b6882327573ec4e694c1c852307c957d544b9 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Tue, 5 May 2009 14:10:42 +0000
+Subject: [PATCH] ldd segfault fix
+
+Fixes ldd segfault on this testcase:
+
+extern void _dl_getenv(void);
+void foo(void)
+{
+ printf("foo: %x\n", &_dl_getenv);
+}
+
+linked as -shared
+---
+ utils/ldd.c | 8 +++++---
+ 1 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/utils/ldd.c b/utils/ldd.c
+index 1f1dc25..2cd173c 100644
+--- a/utils/ldd.c
++++ b/utils/ldd.c
+@@ -576,18 +576,20 @@ static struct library *find_elf_interpreter(ElfW(Ehdr) *ehdr)
+ }
+ newlib->name = NULL;
+ newlib->path = NULL;
+- return NULL;
++ break;
+ }
+ }
+- if (newlib == NULL)
++ if (newlib == NULL) {
+ newlib = malloc(sizeof(struct library));
++ if (newlib)
++ newlib->next = NULL;
++ }
+ if (!newlib)
+ return NULL;
+ newlib->name = malloc(strlen(s) + 1);
+ strcpy(newlib->name, s);
+ newlib->path = strdup(newlib->name);
+ newlib->resolved = 1;
+- newlib->next = NULL;
+
+ #if 0
+ /*printf("find_elf_interpreter is adding '%s' to '%s'\n", newlib->name, newlib->path); */
+--
+1.6.2.3
+
diff --git a/main/libc0.9.32/APKBUILD b/main/libc0.9.32/APKBUILD
index 47bc5862ea..0b7751f3e8 100644
--- a/main/libc0.9.32/APKBUILD
+++ b/main/libc0.9.32/APKBUILD
@@ -3,7 +3,7 @@ _abiver=0.9.32
pkgname=libc$_abiver
_gitver=100507
pkgver=${_abiver}_alpha0_git$_gitver
-pkgrel=2
+pkgrel=3
pkgdesc="C library for developing embedded Linux systems"
url=http://uclibc.org
license="LGPL-2"
@@ -17,6 +17,7 @@ _snapurl="http://git.uclibc.org/uClibc/snapshot/master.tar.bz2"
_snapfile="$pkgname-$pkgver.tar.bz2"
source="http://build.alpinelinux.org:8010/distfiles/$_snapfile
compat-stack-guard.patch
+ 0001-ldd-segfault-fix.patch
0001-static-build-fix-internal-locking-weaks-to-get-pulle.patch
0002-resolv-various-memory-corruption-and-off-by-one-fixe.patch
uclibc-libm-pic.patch
@@ -96,6 +97,7 @@ utils() {
md5sums="46e98672dc2a4309d9a7c65b4e626845 libc0.9.32-0.9.32_alpha0_git100507.tar.bz2
4d408f72142ce55a0754948cc9cfe447 compat-stack-guard.patch
+4079b20c763727863bc53408e4988434 0001-ldd-segfault-fix.patch
826666b365f2d63a71d67eb76c94f7bc 0001-static-build-fix-internal-locking-weaks-to-get-pulle.patch
0800a489a738c7b1d8c3643cb9806926 0002-resolv-various-memory-corruption-and-off-by-one-fixe.patch
2f9739a980be24a842c57516155c7885 uclibc-libm-pic.patch