unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Cary Coutant <ccoutant@gmail.com>
Cc: Mark Wielaard <mark@klomp.org>, "H.J. Lu" <hjl.tools@gmail.com>,
	x86-64-abi <x86-64-abi@googlegroups.com>,
	Binutils <binutils@sourceware.org>,
	GNU C Library <libc-alpha@sourceware.org>
Subject: Re: PT_NOTE alignment, NT_GNU_PROPERTY_TYPE_0, glibc and gold
Date: Fri, 24 Aug 2018 20:39:16 +0200	[thread overview]
Message-ID: <0605973a-4c3d-9033-e4f1-c0aedd045aaa@redhat.com> (raw)
In-Reply-To: <CAJimCsFNtmvfF1dRxBp4rFX8ZheMKiY4_bzo3oDNDkOyTn52Bg@mail.gmail.com>

On 08/23/2018 01:36 AM, Cary Coutant wrote:
>>> Why should the loader have to go parsing everything in a generic PT_NOTE
>>> segment anyway?
>>
>> With 8-byte alignment, in practice, it is currently quite fast to discover
>> the new notes because the other notes have 4-byte alignment, so the PT_NOTE
>> segment with the property notes should be pleasantly short.
> 
> I understand the benefit of having a PT_NOTE segment containing
> nothing but the one note, and this is certainly expedient, but it's
> quite ugly and, I think, fragile. This really underscores the value of
> defining a bespoke segment type for this one purpose.

Yes, the existing note processing in linkers makes this fragile.

> How difficult would it be for glibc if the linker would consume the
> existing .note.gnu.property sections, then generate an output section
> with the same format (maybe minus the SHT_NOTE overhead), but using a
> new section type in its own new segment type? You could continue to
> look for 8-byte aligned legacy PT_NOTE segments, but could also look
> for the new PT_GNU_PROPERTY segment.

It does not sound difficult to implement.  This is based on the 
assumption that the current dynamic loader ignores unknown segment types 
(which I think is true).

But I don't view this a win because it doesn't take the 8-byte notes out 
of circulation.  We'd still have to support both indefinitely, and would 
have update GCC as well.  We can just keep using the existing code.

Thanks,
Florian

  reply	other threads:[~2018-08-24 18:39 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAMe9rOrrayKnc_cPm4SmnDnUGLbBUmOYMBTMOM8KLAHVmb=rUQ@mail.gmail.com>
2018-08-16 13:00 ` PT_NOTE alignment, NT_GNU_PROPERTY_TYPE_0, glibc and gold (was: Re: [PATCH] Document GNU_PROPERTY_X86_ISA_1_[USED|NEEDED]) Florian Weimer
2018-08-16 13:19   ` H.J. Lu
2018-08-16 13:29     ` H.J. Lu
2018-08-16 13:31     ` PT_NOTE alignment, NT_GNU_PROPERTY_TYPE_0, glibc and gold Florian Weimer
2018-08-16 13:39       ` H.J. Lu
2018-08-16 14:01         ` Florian Weimer
2018-08-16 14:43           ` H.J. Lu
2018-08-16 14:21         ` Florian Weimer
2018-08-16 17:46           ` H.J. Lu
2018-08-16 19:16           ` Mark Wielaard
2018-08-16 19:36             ` H.J. Lu
2018-08-17  6:04               ` Mark Wielaard
2018-08-17  6:20             ` Florian Weimer
2018-08-17  6:41               ` Mark Wielaard
2018-08-17 15:10                 ` H.J. Lu
2018-08-17 21:05                   ` Mark Wielaard
2018-08-21 23:02                     ` Cary Coutant
2018-08-22  9:39                       ` Florian Weimer
2018-08-22 10:08                         ` Mark Wielaard
2018-08-22 23:36                         ` Cary Coutant
2018-08-24 18:39                           ` Florian Weimer [this message]
2018-08-23 14:41                         ` Michael Matz
2018-08-23 14:43                           ` Florian Weimer
2018-08-17 15:13               ` H.J. Lu
2018-09-19 19:22   ` Florian Weimer
2018-09-21 12:55     ` Michael Matz
2018-09-21 13:04       ` Florian Weimer
2018-09-26 17:39     ` Cary Coutant
2018-09-26 18:36       ` H.J. Lu

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

  List information: https://www.gnu.org/software/libc/involved.html

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

  git send-email \
    --in-reply-to=0605973a-4c3d-9033-e4f1-c0aedd045aaa@redhat.com \
    --to=fweimer@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=ccoutant@gmail.com \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=mark@klomp.org \
    --cc=x86-64-abi@googlegroups.com \
    /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).