From f91f1c0fb89056995f1c9c6a06c361efdf5139e7 Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Fri, 28 Jun 2013 16:20:26 +0100 Subject: [BZ #15022] Correct global-scope dlopen issues in static executables. This change creates a link map in static executables to serve as the global search list for dlopen. It fixes a problem with the inability to access the global symbol object and a crash on an attempt to map a DSO into the global scope. Some code that has become dead after the addition of this link map is removed too and test cases are provided. --- ChangeLog | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 1012b2c2db..174b184c37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,26 @@ +2013-06-28 Maciej W. Rozycki + + [BZ #15022] + * elf/dl-support.c (_dl_main_map): New variable. + (_dl_ns): Use it to initialize [LM_ID_BASE] element. + (_dl_nns, _dl_load_adds): Set to 1. + (_dl_initial_searchlist): Refer to _dl_main_map. + (_dl_non_dynamic_init): Initialize _dl_main_map.l_origin. + * elf/dl-load.c (_dl_dst_substitute) [!SHARED]: Remove fallback + call to _dl_get_origin. + * elf/dl-open.c (dl_open_worker): Remove !SHARED special casing + around call_map. + (_dl_open) [!SHARED]: Remove code to initialize GL(dl_nns). + * dlfcn/modstatic3.c: New file. + * dlfcn/tststatic3.c: New file. + * dlfcn/tststatic4.c: New file. + * dlfcn/Makefile (tests): Add tststatic3 and tststatic4. + (tests-static): Likewise. + (modules-names): Add modstatic3. + (tststatic3-ENV, tststatic4-ENV): New variables. + ($(objpfx)tststatic3, $(objpfx)tststatic3.out): New dependencies. + ($(objpfx)tststatic4, $(objpfx)tststatic4.out): Likewise. + 2013-06-26 Joseph Myers * configure.in (CC): Require GCC version 4.4 or later. -- cgit v1.2.3