From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: libc-alpha@sourceware.org, Szabolcs Nagy <szabolcs.nagy@arm.com>,
rrh.henry@gmail.com
Subject: Re: RFC: Remove --disable-hidden-plt
Date: Tue, 6 Apr 2021 14:39:27 -0300 [thread overview]
Message-ID: <bfeb43b1-5ffd-84c2-983e-011c21c75252@linaro.org> (raw)
In-Reply-To: <20210406171833.24b5vr4j2b762knb@begin>
On 06/04/2021 14:18, Samuel Thibault wrote:
> Adhemerval Zanella via Libc-alpha, le mar. 06 avril 2021 14:12:41 -0300, a ecrit:
>>
>>
>> On 03/04/2021 14:41, H.J. Lu via Libc-alpha wrote:
>>> --disable-hidden-plt was added by
>>>
>>> commit 749a9a4fbfd261e2d9811d9bc4507478c2f7cc58
>>> Author: Roland McGrath <roland@gnu.org>
>>> Date: Tue Oct 1 08:45:44 2002 +0000
>>>
>>> 2002-10-01 Roland McGrath <roland@frob.com>
>>>
>>> * config.h.in (NO_HIDDEN): New #undef.
>>> * include/libc-symbols.h [! NO_HIDDEN]: Add this condition to
>>> nonempty definitions of hidden_proto et al.
>>> * configure.in: Grok --disable-hidden-plt to define NO_HIDDEN.
>>> * configure: Regenerated.
>>> * sysdeps/mach/hurd/configure.in: Always define NO_HIDDEN.
>>> * sysdeps/mach/hurd/configure: Regenerated.
>>>
>>> It doesn't work on x86-64:
>>>
>>> https://sourceware.org/bugzilla/show_bug.cgi?id=27692
>>>
>>> Should it be removed?
>>>
>>
>> My take is to remove it. Besides the reasons noted by Szabolcs [1],
>> some symbols interposition are not really possible on some scenarios
>> (for instance intra IFUNC call through hidden symbol on i686 and ppc32),
>> it requires more development effort (as any configure switch and we
>> will probably need a configure check to see if *all* supposed intra
>> calls are actually being called through PLT and fix bugs with missing
>> support), there is no clear advantage of providing such functionality,
>> and it broken on every architecture for some time (at least since
>> 2.27).
>>
>> However it seems it will still need to support it internally for
>> Hurd
>
> Yes, some symbols in ld.so (most of sysdeps/mach/hurd/dl-sysdep.c)
> *need* to be interposed by the loaded libc.so, because the
> implementation in ld.so is to be used only at bootstrap of the program,
> and then overriden by the real full-fledged implementation.
Are these the only ones required to Hurd? I wonder if would be simple to
instead of have the bit NO_HIDDEN hammer, to create a different
hidden_def/hidden_proto to be used on the required symbols (where default
version would map to use non-PLT call and Hurd could just reimplement
it).
next prev parent reply other threads:[~2021-04-06 17:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-03 17:41 H.J. Lu
2021-04-06 17:12 ` Adhemerval Zanella
2021-04-06 17:18 ` Samuel Thibault
2021-04-06 17:39 ` Adhemerval Zanella [this message]
2021-04-06 18:03 ` Samuel Thibault
2021-04-06 18:15 ` Adhemerval Zanella
2021-04-06 18:43 ` Samuel Thibault
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=bfeb43b1-5ffd-84c2-983e-011c21c75252@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
--cc=rrh.henry@gmail.com \
--cc=samuel.thibault@ens-lyon.org \
--cc=szabolcs.nagy@arm.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).