From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) by sourceware.org (Postfix) with ESMTPS id F11803857818 for ; Tue, 6 Apr 2021 17:39:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F11803857818 Received: by mail-qk1-x72d.google.com with SMTP id y5so15775564qkl.9 for ; Tue, 06 Apr 2021 10:39:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=3tEnXivgAhLTSEitobPU0fDrB98Di21TZFliRMhl+8Y=; b=gqRShfNErjCahoIuU9rqAvr8lDXXLD1GS2K6R+Ojy0hS9Oxhup7VzhzMdUb5OosDQH zSGOM/FvOO+D781uIfq1Y9nHcmVH0ky3W22ZGBqzEGYQv8X9es4EsemV6KA8nF2G8XOP ljiuyOWlhUDmoRd39K3FJ4JgEydZ7/zu1hiLN8RBdvnJDJYzvQt0qUHxTSFEGl+P6zOM zL4aVMJ5wrkMR2JIRD5h/tYUTAkMzTWXU+VPyK71HwJnk4qWO4VTvORiPnSqcFqzKcjh 3Ehi5c6LM1wuT4QD+gB+2+mk+w6ZoEhZ0zUHwweNO+HAxKSPrgoiCrM1O7KTJ0Z0lJgX 8N5w== X-Gm-Message-State: AOAM533phTrN98gm5hjmbLnZCCghBT21afVhV/f7Sa9i+FuLCsVaDg9u 8J1qs1JjhKDglStUUMBrPIDjQA== X-Google-Smtp-Source: ABdhPJxB2I7UZctegRUZ+G3lt8znbrpoJjjuaHJYwCeLV3wMGvmXKjujbnBrrAXcfRb99v4ra0n44A== X-Received: by 2002:a37:58c5:: with SMTP id m188mr29954921qkb.327.1617730770458; Tue, 06 Apr 2021 10:39:30 -0700 (PDT) Received: from [192.168.1.132] ([177.194.41.149]) by smtp.gmail.com with ESMTPSA id s13sm14946703qtx.42.2021.04.06.10.39.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Apr 2021 10:39:30 -0700 (PDT) Subject: Re: RFC: Remove --disable-hidden-plt To: Samuel Thibault Cc: libc-alpha@sourceware.org, Szabolcs Nagy , rrh.henry@gmail.com References: <28ab0b62-2b14-4fd2-b333-abb1d91fa714@linaro.org> <20210406171833.24b5vr4j2b762knb@begin> From: Adhemerval Zanella Message-ID: Date: Tue, 6 Apr 2021 14:39:27 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210406171833.24b5vr4j2b762knb@begin> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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:39:32 -0000 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 >>> 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. 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).