mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: some odd library loading errors
Date: Tue, 17 Nov 2015 17:34:00 +0100	[thread overview]
Message-ID: <20151117163359.GH18372@port70.net> (raw)
In-Reply-To: <20151117155545.GZ3818@brightrain.aerifal.cx>

* Rich Felker <dalias@libc.org> [2015-11-17 10:55:45 -0500]:
> On Tue, Nov 17, 2015 at 04:45:16PM +0100, Szabolcs Nagy wrote:
> > 
> > i guess --disable-gnu-indirect-function could be the default when
> > gcc targets musl (assuming musl will not implement ifuncs anytime soon).
> 
> I think that's a reasonable assumption. Based on what I've seen
> lately, rather than finding solutions to the problems we knew about
> already, the rabbit hole keeps going deeper...
> 
> If you have reason to believe otherwise could you explain how we might
> reasonably support ifunc?
> 

well we can add support for ifunc by..

calling the ifunc resolver during reloc processing when STT_GNU_IFUNC
symbol or R_*_IRELATIVE reloc is found and in case of static linking
the relocs between __rel_iplt_{start,end} should be processed somehow.

the only ugliness is that passing arguments to the resolver is arch
specific.. and that there is no guarantee what the resolver might do
(but that's the same with glibc and it is something the user should
worry about)

i think even if musl does the reloc processing in different order
than glibc, this might work in practice and if the resolver crashes
we can say that it invoked ub.


  reply	other threads:[~2015-11-17 16:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-17 12:14 u-uy74
2015-11-17 15:23 ` Szabolcs Nagy
2015-11-17 15:27   ` Rich Felker
2015-11-17 15:45     ` Szabolcs Nagy
2015-11-17 15:55       ` Rich Felker
2015-11-17 16:34         ` Szabolcs Nagy [this message]
2015-11-17 17:13           ` Rich Felker
2015-11-17 15:42   ` u-uy74

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=20151117163359.GH18372@port70.net \
    --to=nsz@port70.net \
    --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).