From cfa1d49e87eae4d46e0f0d568627b210383534f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Thu, 22 Apr 2010 05:53:43 +0000 Subject: nptl: fix dynamic initialization of libpthread MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If libpthread get's pulled in via dlopen(), we need to do libpthread initialization in dlopen(). Achieve this by making initializer function out of __pthread_initialize_minimal_internal. Add the proper linker flags and make it callable multiple times. Add also nodelete flag which ensures that libpthread will not get unmapped after it's been loading. Though, ld.so does not yet support this. Signed-off-by: Timo Teräs Signed-off-by: Austin Foxley --- libpthread/nptl/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpthread/nptl/Makefile.in') diff --git a/libpthread/nptl/Makefile.in b/libpthread/nptl/Makefile.in index d33656532..1e9f98cea 100644 --- a/libpthread/nptl/Makefile.in +++ b/libpthread/nptl/Makefile.in @@ -220,7 +220,7 @@ else LDFLAGS-libpthread.so := $(LDFLAGS) endif -LDFLAGS-libpthread.so += $(top_builddir)lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so $(top_builddir)lib/libdl-$(VERSION).so +LDFLAGS-libpthread.so += $(top_builddir)lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so $(top_builddir)lib/libdl-$(VERSION).so -Wl,-z,nodelete,-z,initfirst,-init=__pthread_initialize_minimal_internal LIBS-libpthread.so := $(LIBS) -- cgit v1.2.3