public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "John.Tobey at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug dynamic-link/11767] RFE: dlopen of in-memory ET_DYN or ET_EXEC object
Date: Wed, 18 Jul 2012 20:48:00 -0000	[thread overview]
Message-ID: <bug-11767-131-60FAs9AcpH@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-11767-131@http.sourceware.org/bugzilla/>

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

--- Comment #8 from John Tobey <John.Tobey at gmail dot com> 2012-07-18 20:48:27 UTC ---
Another use case: languages like Lisp require a global, canonical, dynamic
mapping of strings to symbols.  When the language runtime implements this, it
duplicates a lot of the dynamic loader's work.  I would like to implement Lisp
symbols as ELF symbols.  This way, the system handles the common case of symbol
names known at compile time, whether in the executable or libraries.  The only
things it doesn't handle are dynamically created symbols (INTERN in Lisp).

Currently, my best option is to create the symbols as memory addresses arranged
to resemble a DSO.  I intercept calls to dlopen() and "flush" the current set
of dynamically allocated symbols.  This "flushing" operation involves writing
an ELF object with a fixed load address that lines up with the symbol values in
use, then loading the object.  I do this so the dlopen'd library will see any
symbols it may refer to.  I suspect this will require a mutex around mmap and
friends as well as DSO operations.  All this file writing and mutexing would be
unneeded if we had dlopen_phdr.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


  parent reply	other threads:[~2012-07-18 20:48 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-11767-131@http.sourceware.org/bugzilla/>
2010-11-12 23:37 ` [Bug libc/11767] " John.Tobey at gmail dot com
2012-02-21  1:50 ` [Bug ld.so|libdl/11767] " jsm28 at gcc dot gnu.org
2012-03-05 23:23 ` [Bug dynamic-link/11767] " greg at krypto dot org
2012-07-16 23:27 ` remy.blank at pobox dot com
2012-07-18 14:00 ` bugdal at aerifal dot cx
2012-07-18 14:17 ` ppluzhnikov at google dot com
2012-07-18 18:16 ` bugdal at aerifal dot cx
2012-07-18 19:52 ` remy.blank at pobox dot com
2012-07-18 20:33 ` jreiser at BitWagon dot com
2012-07-18 20:48 ` John.Tobey at gmail dot com [this message]
2012-07-19  2:00 ` bugdal at aerifal dot cx
2012-07-19  4:32 ` greg at krypto dot org
2012-12-19 10:47 ` schwab@linux-m68k.org
2013-01-15 16:27 ` schwab@linux-m68k.org
2013-01-15 16:31 ` fweimer at redhat dot com
2013-02-22  1:55 ` ronis at google dot com
2013-03-29  5:05 ` brad.froehle at gmail dot com
2013-10-21  7:55 ` neleai at seznam dot cz
2013-11-04 20:03 ` ppluzhnikov at google dot com
2013-11-04 21:05 ` neleai at seznam dot cz
2013-11-04 21:36 ` jreiser at BitWagon dot com
2013-11-04 21:42 ` bugdal at aerifal dot cx
2013-11-04 21:48 ` ppluzhnikov at google dot com
2013-11-05  1:49 ` jtobey@john-edwin-tobey.org
2013-11-05  3:39 ` bugdal at aerifal dot cx
2013-11-05  4:16 ` jtobey@john-edwin-tobey.org
2013-11-05  4:27 ` greg at krypto dot org
2014-01-30 19:37 ` w.s.cullin+sw at gmail dot com
2014-02-16 17:44 ` jackie.rosen at hushmail dot com
2014-05-28 19:45 ` schwab at sourceware dot org
2014-06-30 17:44 ` fweimer at redhat dot com
2021-11-27 12:01 ` stsp at users dot sourceforge.net
2023-02-09  9:50 ` stsp at users dot sourceforge.net
2023-03-29 14:45 ` sam at gentoo dot org
2023-03-29 14:45 ` sam at gentoo dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-11767-131-60FAs9AcpH@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).