From: Florian Weimer <fweimer@redhat.com>
To: "Fāng-ruì Sòng" <maskray@google.com>
Cc: "H.J. Lu" <hjl.tools@gmail.com>,
GNU C Library <libc-alpha@sourceware.org>,
"Carlos O'Donell" <carlos@redhat.com>,
Adhemerval Zanella <adhemerval.zanella@linaro.org>,
Joseph Myers <joseph@codesourcery.com>
Subject: Re: [PATCH v2] elf: Avoid nested functions in the loader (all ports) [BZ #27220]
Date: Thu, 23 Sep 2021 19:13:19 +0200 [thread overview]
Message-ID: <87v92rnrkg.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <CAFP8O3JZWqi4N9vRDkvmt6zCsU1rYNwsh8q0qmSMai0j3DDxkw@mail.gmail.com> (=?utf-8?B?IkbEgW5nLXJ1w6wgU8OybmciJ3M=?= message of "Thu, 23 Sep 2021 09:58:30 -0700")
* Fāng-ruì Sòng:
> For elf/dl-reloc.os on x86-64, I think the nested function version can
> use *(rbp - offset) to get some arguments.
> The new version needs more instructions but the cost is small compared
> with the expensive _dl_lookup_symbol_x.
I have a patch that reduces the number of _dl_lookup_symbol_x calls for
the self-relocation (bootstrap or not):
[v3,3/3] elf: Rework exception handling in the dynamic loader [BZ #25486]
<https://patchwork.sourceware.org/project/glibc/patch/05e1b5b43416eba58f2bab968320fa3d38e33479.1607085588.git.fweimer@redhat.com/>
It needs rebase on the current tree.
We recently lost the internal _r_debug reference, which is probably a
bug. Other architectures have some other crud in ld.so. But I think we
can get the number of symbols used in self-relocation down to zero on
all architectures fairly easily.
Once we do that, how much of the bootstrap relocation goo is really
left?
Thanks,
Florian
next prev parent reply other threads:[~2021-09-23 17:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-23 7:17 Fangrui Song
2021-09-23 8:07 ` Andreas Schwab
2021-09-23 8:17 ` Fangrui Song
2021-09-23 8:39 ` Andreas Schwab
2021-09-23 13:08 ` Zack Weinberg
2021-09-23 16:11 ` Fangrui Song
2021-09-23 16:19 ` H.J. Lu
2021-09-23 16:58 ` Fāng-ruì Sòng
2021-09-23 17:13 ` Florian Weimer [this message]
2021-09-23 17:34 ` Fāng-ruì Sòng
2021-09-23 17:40 ` Florian Weimer
2021-09-23 19:05 ` Fangrui Song
2021-09-23 21:48 ` Florian Weimer
2021-09-23 22:41 ` Fāng-ruì Sòng
2021-09-24 5:58 ` Florian Weimer
2021-09-24 7:23 ` Florian Weimer
2021-09-24 7:32 ` Fāng-ruì Sòng
2021-09-24 8:27 ` Florian Weimer
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=87v92rnrkg.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=adhemerval.zanella@linaro.org \
--cc=carlos@redhat.com \
--cc=hjl.tools@gmail.com \
--cc=joseph@codesourcery.com \
--cc=libc-alpha@sourceware.org \
--cc=maskray@google.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).