mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Jon Chesterfield <jonathanchesterfield@gmail.com>
To: musl@lists.openwall.com
Subject: Deploying a dynamic executable on glibc systems - how?
Date: Thu, 15 Sep 2016 14:20:27 +0100	[thread overview]
Message-ID: <CAOUYtQDpbEtgS=ZD_RnFgpGF53MEES1HkTkDc8Tn6vQ_8wdt6Q@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1090 bytes --]

Hi all,

I have just been through the process of shipping a program built on a
recent glibc system for use on an old one. This has left me looking for an
alternative.

In general, I like the approach of statically linking everything and
shipping the single enormous binary. This solves the compatibility problems
in exchange for removing dynamic linking.

Unfortunately I also like dlopen and the combination of static linking and
dlopen is an unhappy one.

My thoughts on resolving this are:
1/ link the entire musl libc into a static main executable
2/ put all the symbols in a table analogous to a plt in this executable
3/ hack the loader to look in said table
4/ open plugin using dlopen

The idea is to keep main static enough that it doesn't need the system
loader to start, yet dynamic enough that libc can be exported.

However, "first hack the loader" suggests there may be a better way. I'm
essentially looking for a way of deploying an application that can load
plugins without also installing the musl loader to the host. Can someone
see a better solution?

Kind regards,

Jon

[-- Attachment #2: Type: text/html, Size: 1285 bytes --]

             reply	other threads:[~2016-09-15 13:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-15 13:20 Jon Chesterfield [this message]
2016-09-15 15:14 ` Rich Felker

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='CAOUYtQDpbEtgS=ZD_RnFgpGF53MEES1HkTkDc8Tn6vQ_8wdt6Q@mail.gmail.com' \
    --to=jonathanchesterfield@gmail.com \
    --cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).