From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id CCBD33858D37 for ; Fri, 22 Apr 2022 06:35:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CCBD33858D37 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-280-caLo_WmoP5OGcMQrqMZVxQ-1; Fri, 22 Apr 2022 02:35:40 -0400 X-MC-Unique: caLo_WmoP5OGcMQrqMZVxQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2B56C811E78; Fri, 22 Apr 2022 06:35:40 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.193.187]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 56553401D58; Fri, 22 Apr 2022 06:35:39 +0000 (UTC) From: Florian Weimer To: Siddhesh Poyarekar Cc: libc-alpha@sourceware.org Subject: Re: [PATCH v3 2/2] Default to --with-default-link=no (bug 25812) References: <15c7f6e9afe2c2b9c51ebc6372682a39b0932712.1649691083.git.fweimer@redhat.com> Date: Fri, 22 Apr 2022 08:35:37 +0200 In-Reply-To: (Siddhesh Poyarekar's message of "Fri, 22 Apr 2022 11:42:51 +0530") Message-ID: <87a6cdtykm.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, 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 06:35:45 -0000 * 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. > 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. >> 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. Thanks, Florian