public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fweimer at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug dynamic-link/28218] ld.so: ifunc resolver calls a lazy PLT. When does it work?
Date: Thu, 12 Aug 2021 07:36:34 +0000	[thread overview]
Message-ID: <bug-28218-131-17r4oE9hdx@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28218-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=28218

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com

--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Alan Modra from comment #1)
> > FreeBSD rtld resolves non-IRELATIVE relocations in all modules, then
> > IRELATIVE relocations in all modules.
> Yes, this is the correct way to do things, and the only general way to
> support cross-module ifunc resolvers that themselves might need to be
> relocated.  We have known this for a long time.  See for example
> https://gcc.gnu.org/legacy-ml/gcc-patches/2009-07/msg01307.html

Cross-module IFUNC resolvers that have relocation dependencies need more
deferral than just IRELATIVE relocations. Regular relocations which target an
IFUNC symbol need to be deferred, and copy relocations as well. Even that does
not completely address all cases.

My impression is that the glibc maintainers think that IFUNC resolvers must not
use have relocation dependencies. This could mean that they can only be
implemented in assembler on some targets.

Initial comments on a proposal were positive:
https://sourceware.org/legacy-ml/libc-alpha/2017-01/msg00468.html But I think
during later discussions, this approach was rejected.

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

  parent reply	other threads:[~2021-08-12  7:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-28218-131@http.sourceware.org/bugzilla/>
2021-08-10 17:37 ` [Bug dynamic-link/28218] ld: " i at maskray dot me
2021-08-10 17:37 ` [Bug dynamic-link/28218] ld.so: " i at maskray dot me
2021-08-12  6:16 ` amodra at gmail dot com
2021-08-12  7:36 ` fweimer at redhat dot com [this message]
2021-08-15  1:32 ` i at maskray dot me
2021-08-15 18:56 ` i at maskray dot me

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-28218-131-17r4oE9hdx@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /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).