From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hera.aquilenet.fr (hera.aquilenet.fr [185.233.100.1]) by sourceware.org (Postfix) with ESMTPS id 626173844054 for ; Tue, 6 Apr 2021 17:18:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 626173844054 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=samuel.thibault@ens-lyon.org Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id B4A7F13B; Tue, 6 Apr 2021 19:18:36 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1mz7cWAgtR5B; Tue, 6 Apr 2021 19:18:35 +0200 (CEST) Received: from begin (unknown [IPv6:2a01:cb19:956:1b00:de41:a9ff:fe47:ec49]) by hera.aquilenet.fr (Postfix) with ESMTPSA id BEBF89D; Tue, 6 Apr 2021 19:18:34 +0200 (CEST) Received: from samy by begin with local (Exim 4.94) (envelope-from ) id 1lTpLV-00For6-2Y; Tue, 06 Apr 2021 19:18:33 +0200 Date: Tue, 6 Apr 2021 19:18:33 +0200 From: Samuel Thibault To: Adhemerval Zanella Cc: libc-alpha@sourceware.org, Szabolcs Nagy , rrh.henry@gmail.com Subject: Re: RFC: Remove --disable-hidden-plt Message-ID: <20210406171833.24b5vr4j2b762knb@begin> References: <28ab0b62-2b14-4fd2-b333-abb1d91fa714@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <28ab0b62-2b14-4fd2-b333-abb1d91fa714@linaro.org> Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spamd-Bar: -- Authentication-Results: hera.aquilenet.fr X-Rspamd-Server: hera X-Rspamd-Queue-Id: B4A7F13B X-Spamd-Result: default: False [-2.50 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2021 17:18:40 -0000 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 > > Date: Tue Oct 1 08:45:44 2002 +0000 > > > > 2002-10-01 Roland McGrath > > > > * 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