From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aye.elm.relay.mailchannels.net (aye.elm.relay.mailchannels.net [23.83.212.6]) by sourceware.org (Postfix) with ESMTPS id C708938515FA for ; Fri, 22 Apr 2022 08:12:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C708938515FA Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id DA6FF760C9F; Fri, 22 Apr 2022 08:12:36 +0000 (UTC) Received: from pdx1-sub0-mail-a307.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 5E7BC760B1E; Fri, 22 Apr 2022 08:12:36 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1650615156; a=rsa-sha256; cv=none; b=3D94TvQcplVgSuTjbbNiC7/hKxAR5w2/wDixfX4QNJApV6T0jDL6Ae/s5CiSQchODp++48 XmP4002VS8gN2n/CJFDFNQsXK83ov1eGJ9DotoTAnwsC6GhV+G1rMMDk01aT431RAItK+k jueCPT9ZwIq/rXnvrqOrkM5ffM9WQvpf/M/CD3NJumhvTbIUxtBghro1H6fb5vHXxPIWEK 0xjaVuOtiLnXC9AGocZxOvnepjxQqsBt/VMajytPE1DTPR5FyRYbzhq+zqZiwZk7n3bWwD Vm6AIlxtWE/7kJCSg/GIYKnpAFe4e5SX5ExtXP22iKM0jhIZi79Hv3mUsU8lZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1650615156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=cEPPR3r4jUr+WRijqOODtEVz3F7Xtc8UXx/mvNIyZlk=; b=xCNrv6gEi8tQwJss9QbGXzqUrjLdqCxLhaELULHgQA3HeBrcyAPt6qG/pwjHy6jPDuUibC /j0miYZ20JsfRzp2xUGrwOq/tnpeN1dFhp6TmxhDEPgxdJbtmvUZGwVZ8YiU5IcU5dugpA /l15EWMHHd9ytbkut1bKkivQB8+gyJ45NAxn5Pv4EZrLkrJTCBT+TC9XsWIghs7mVS4bJG 8p9TbkLFbWFIA7keIgdFB8e4wKkoToYQf5tbsX518oijgP3XJLJTcgj9nXGakZSRFhrdtn 1vXEMOLjII9nzm9Za60Wr64TkFRjteKsdFYA26oHrBUqOeGRXYYk8sAeCZzDkQ== ARC-Authentication-Results: i=1; rspamd-58ff8d7479-mq6sx; auth=pass smtp.auth=dreamhost smtp.mailfrom=siddhesh@gotplt.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Chemical-Versed: 257780bf610550a0_1650615156616_3812874154 X-MC-Loop-Signature: 1650615156616:1383656761 X-MC-Ingress-Time: 1650615156616 Received: from pdx1-sub0-mail-a307.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.116.106.101 (trex/6.7.1); Fri, 22 Apr 2022 08:12:36 +0000 Received: from [192.168.1.174] (unknown [1.186.121.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a307.dreamhost.com (Postfix) with ESMTPSA id 4Kl6b645BNz1Sf; Fri, 22 Apr 2022 01:12:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gotplt.org; s=dreamhost; t=1650615156; bh=cEPPR3r4jUr+WRijqOODtEVz3F7Xtc8UXx/mvNIyZlk=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=OHF0qzc4AD8PKW+DWVZJVLKvYjxkVGzFcARdp6pqx5+/peWnph2+rJjiGP50cY6ra bo4H83k0Vi9YDktdVLJKDkCdOXNMVwgoyjE3wCXBZ8C0Lhk5+b7SKkIFiKSwZcGDmM ScOSCwo1+4F9zpY2Of+Mt9gwv8vmjyOKayQ6qSAgIMTbh75hKU9cKzl96+1MSpjCyn AmmkTMLaSo2FnCwYCg6stJDXm6YlDXzAaNtao1x6Go0KaXV92Uawx5mSb+e/tfGASc AzRptswSDMLh7Ek5AZF5d13zyphEK0aCnRovSiq4/lylYMyWUznI6BQi8Uekll0wjo UnocMYgkm3Tgw== Message-ID: Date: Fri, 22 Apr 2022 13:42:29 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v3 2/2] Default to --with-default-link=no (bug 25812) Content-Language: en-US To: Florian Weimer Cc: libc-alpha@sourceware.org References: <15c7f6e9afe2c2b9c51ebc6372682a39b0932712.1649691083.git.fweimer@redhat.com> <87a6cdtykm.fsf@oldenburg.str.redhat.com> From: Siddhesh Poyarekar In-Reply-To: <87a6cdtykm.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3040.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_SBL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Fri, 22 Apr 2022 08:12:41 -0000 On 22/04/2022 12:05, Florian Weimer wrote: > * Siddhesh Poyarekar: > >>> diff --git a/INSTALL b/INSTALL >>> index 63c022d6b9..de150f66eb 100644 >>> --- a/INSTALL >>> +++ b/INSTALL >>> @@ -90,6 +90,12 @@ if 'CFLAGS' is specified it must enable optimization. For example: >>> library will still be usable, but functionality may be lost--for >>> example, you can't build a shared libc with old binutils. >>> +'--with-default-link=FLAG' >>> + With '--with-default-link=yes', the GNU C Library does not use a >>> + custom linker scipt for linking its individual shared objects. The >>> + default for FLAG is the opposite, 'no', because the custom linker >>> + script is needed for full RELRO protection. >>> + >> >> Andreas' comments still apply here I think, i.e. fix the "scipt" type >> and rephrase so that it's clearer that the option controls the library >> build process and not the library itself. > > I thought I had fixed this. What about this? > > '--with-default-link=FLAG' > With '--with-default-link=yes', the build system does not use a > custom linker script for linking shared objects. The default for > FLAG is the opposite, 'no', because the custom linker script is > needed for full RELRO protection. That looks better, thanks. >> Does it make sense to make this --disable-custom-link or >> --enable-default-link instead, since the option is binary? The --with >> prefix is typically for richer options, e.g. paths. Suggest something >> like this: >> >> --disable-custom-link >> Don't use a custom linker script to build the GNU C Library, >> preferring the static linker's default script instead. The custom >> linker script is needed for full RELRO protection. > > I want to backport this, and distributions are already using this > option, so I prefer not to make changes here. Fair enough. >>> diff --git a/elf/tst-relro-symbols.py b/elf/tst-relro-symbols.py >>> new file mode 100644 >>> index 0000000000..368ea3349f >>> --- /dev/null >>> +++ b/elf/tst-relro-symbols.py >>> @@ -0,0 +1,137 @@ > >>> +# Make available glibc Python modules. >>> +sys.path.append(os.path.join( >>> + os.path.dirname(os.path.realpath(__file__)), os.path.pardir, 'scripts')) >> >> I wonder if we should put this in the python environment for all glibc >> python scripts. Only a soft suggestion though since this is just the >> first module usage. Maybe as and when we port other such tests to >> this module we should rethink this. > > We set PYTHONPATH in the makefiles in many cases. I did this mostly for > development. Indeed, in fact we have py-env in Rules which may be helpful. How about using it the invocation instead of the above then? Thanks, Siddhesh