public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Siddhesh Poyarekar <siddhesh@gotplt.org>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH v3 2/2] Default to --with-default-link=no (bug 25812)
Date: Fri, 22 Apr 2022 08:35:37 +0200	[thread overview]
Message-ID: <87a6cdtykm.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <bb45c77c-f214-2b91-1987-889b95f746ef@gotplt.org> (Siddhesh Poyarekar's message of "Fri, 22 Apr 2022 11:42:51 +0530")

* 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


  reply	other threads:[~2022-04-22  6:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11 15:32 [PATCH v3 1/2] scripts: Add glibcelf.py module Florian Weimer
2022-04-11 15:32 ` [PATCH v3 2/2] Default to --with-default-link=no (bug 25812) Florian Weimer
2022-04-22  6:12   ` Siddhesh Poyarekar
2022-04-22  6:35     ` Florian Weimer [this message]
2022-04-22  8:12       ` Siddhesh Poyarekar
2022-04-22  8:24         ` Florian Weimer
2022-04-22  8:32           ` Siddhesh Poyarekar
2022-04-22  8:34             ` Florian Weimer
2022-04-22  8:36               ` Siddhesh Poyarekar
2022-04-22  8:56       ` Andreas Schwab
2022-04-29 16:02       ` Dmitry V. Levin
2022-04-29 16:14         ` Florian Weimer
2022-04-29 20:48           ` Dmitry V. Levin
2022-04-28  7:25   ` Fangrui Song
2022-04-28  8:40     ` Florian Weimer
2022-04-29  6:00       ` Fangrui Song
2022-04-29  7:09         ` Florian Weimer
2022-04-29  7:43           ` Fangrui Song
2022-04-29 14:55             ` Florian Weimer
2022-04-29 19:26               ` Fangrui Song
2022-04-29 12:59   ` Adhemerval Zanella
2022-04-29 13:17     ` Florian Weimer
2022-04-29 13:55       ` Adhemerval Zanella
2022-04-29 14:03         ` Florian Weimer
2022-04-21 15:54 ` [PATCH v3 1/2] scripts: Add glibcelf.py module Siddhesh Poyarekar
2022-04-21 20:23   ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a6cdtykm.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=siddhesh@gotplt.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).