From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by sourceware.org (Postfix) with ESMTPS id E4E56386EC23 for ; Tue, 6 Apr 2021 17:12:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E4E56386EC23 Received: by mail-qv1-xf29.google.com with SMTP id j17so7488485qvo.13 for ; Tue, 06 Apr 2021 10:12:44 -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:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=6Wx+/VVtH9EIaZzXrYlD1gPgZgGuq01UtTPQoFh4mRM=; b=bFBlGltQ3dhwaqP9Ha/E/Z/yTPUGbznsJO/GoNQ5MpYw9/sKjnYmxjQfmYDpvdHedE Mo19RUIxAsisfZ3HFQ/HTQ3lFYMzkyZZLQtefnoLfmhNCduPGsnlyypHdj7zMi/mgV8P NqNGCmZ1Wp6o4I/jCQbKxkxdk6J18iaWar+CNErfdxWMgptvgg1mVzoC0Nypyie1QCz2 YWKX0aarCQEyA9FOrg3DSrVl/iLk/ANpKcRZ3U/+W7RdGcPLU4mpdM8PEB52IfwhJO+/ r9MPCJiRmgHcsjwyqo6dX384S+dLXmlHxYOhYbBQ2esaI3wEwGPvIeuKVwHIZ69ZwwPR 6ltw== X-Gm-Message-State: AOAM533UtbzI1fdI9W1Apw2ap/+b5HZ61q5zcJIeSGDQZ9rOM9GrgZaQ JLqpg3dG9T4spNFc/LGNGA8fPQ== X-Google-Smtp-Source: ABdhPJzP6zWJnEXiW+ZkX61hmrSLRUy+96cSDnDmiubUmjlNf4A5pGiVcAa5XYlZXvHxriYh/odg9g== X-Received: by 2002:a0c:b294:: with SMTP id r20mr29044474qve.16.1617729164448; Tue, 06 Apr 2021 10:12:44 -0700 (PDT) Received: from [192.168.1.132] ([177.194.41.149]) by smtp.gmail.com with ESMTPSA id x22sm14900277qts.41.2021.04.06.10.12.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Apr 2021 10:12:44 -0700 (PDT) Subject: Re: RFC: Remove --disable-hidden-plt To: libc-alpha@sourceware.org, Szabolcs Nagy , rrh.henry@gmail.com References: From: Adhemerval Zanella Message-ID: <28ab0b62-2b14-4fd2-b333-abb1d91fa714@linaro.org> Date: Tue, 6 Apr 2021 14:12:41 -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: 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:12:46 -0000 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 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