Article View: comp.unix.programmer
Article #3609Multiple instances of libc (ELF shared object)
From: Arthur Gold
Date: Thu, 07 Oct 1999 00:00
Date: Thu, 07 Oct 1999 00:00
26 lines
1665 bytes
1665 bytes
Perhaps someone can help me here. I have a need, within a shared object, to have multiple instances of libc in my address space (this has to do with tracing library access), one to be linked dynamically (by the process that uses the shared object) and one explicitly dlopen()-ed. Even worse, I need to make sure that the libraries don't "communicate", i.e.that functions in the dlopen()-ed version do not accesss code in the normally linked instance. The straightforward approach does _not_ work as needed, functions from the 'private' (dlopen()-ed) instance "see" the 'public' version's code when functions called from within dlsym()-ed calls are linked. In addition, using multiple libcs seems to mess with the environment (after dlopen()-ing the second libc, the __environ variable changes) in ways I don't really understand (yet ;-) ). Any help would be greatly appreciated! TIA, --ag -- Artie Gold, Austin, TX mailto:agold@bga.com or mailto:agold@cs.utexas.edu -- Pet peeve: "its" = belonging or pertaining to "it" | "it's" = "it is"
Technical Details
Message-ID:
<37FCDB67.CBB5DD0A@bga.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,47089ab1deba9b43,start X-Google-Attributes: gid11318c,public X-Google-Thread: fc89c,47089ab1deba9b43,start X-Google-Attributes: gidfc89c,public From: Arthur Gold <agold@bga.com> Subject: Multiple instances of libc (ELF shared object) Date: 1999/10/07 Message-ID: <37FCDB67.CBB5DD0A@bga.com> X-Deja-AN: 533990397 X-NNTP-Posting-Host: feed1.realtime.net Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii MIME-Version: 1.0 Newsgroups: comp.unix.programmer,gnu.gcc.help