public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: Adhemerval Zanella <adhemerval.zanella@linaro.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 19:18:33 +0200	[thread overview]
Message-ID: <20210406171833.24b5vr4j2b762knb@begin> (raw)
In-Reply-To: <28ab0b62-2b14-4fd2-b333-abb1d91fa714@linaro.org>

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.

Samuel

> and it does catch a potential issue where some implementation
> uses a non intended interface (such as __hidden_ver1).
> 
> I tried to understand why Roland's has added it in the first place,
> but there is no discussion about it on libc-alpha in Sep/Oct 2002.
> 
> [1] https://sourceware.org/bugzilla/show_bug.cgi?id=27692#c7

  reply	other threads:[~2021-04-06 17:18 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 [this message]
2021-04-06 17:39     ` Adhemerval Zanella
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=20210406171833.24b5vr4j2b762knb@begin \
    --to=samuel.thibault@ens-lyon.org \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=rrh.henry@gmail.com \
    --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).