This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug dynamic-link/15022] Global-scope dlopen issues in static executables


http://sourceware.org/bugzilla/show_bug.cgi?id=15022

Maciej W. Rozycki <macro@linux-mips.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
           Assignee|unassigned at sourceware dot org   |macro@linux-mips.org

--- Comment #1 from Maciej W. Rozycki <macro@linux-mips.org> ---
commit f91f1c0fb89056995f1c9c6a06c361efdf5139e7
Author: Maciej W. Rozycki <macro@codesourcery.com>
Date:   Fri Jun 28 16:20:26 2013 +0100

    [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.

2013-06-28  Maciej W. Rozycki  <macro@codesourcery.com>

    [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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]