This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: binutils ld and new PT_GNU_PROPERTY segment


Hi,

On Tue, 2020-02-18 at 18:31 -0800, Fangrui Song wrote:
>  From what I can see, neither the Linux kernel nor glibc uses
> PT_GNU_PROPERTY.
> glibc/sysdeps/x86/dl-prop.h parses PT_NOTE.

That is my impression too.

> I tend to agree with Cary
> (https://sourceware.org/ml/gnu-gabi/2018-q4/msg00036.html) that
> .note.gnu.property should have been designed as a different section
> type
> because its combining semantics are different from other notes
> (we could apply "Rules for Linking Unrecognized Sections" to all
> SHT_NOTE sections) but it is too late to change the section type.

Agreed.

> A separate segment type (PT_GNU_PROPERTY) looks fine to me.
> glibc should probably be updated to parse PT_GNU_PROPERTY instead.

I think it is confusing to now introduce a new segment type which
basically provides the same information as the PT_NOTE segement. It is
ill defined because it needs to be matched to a magic section name.
Which makes things harder for tools dealing with generic SHT_NOTE
sections (they would have to preserve the magic section name, might not
be able to merge notes, etc.)

> (Recently I read some ABI decisions and I noticed that I frequently see
> the term "it is too late". As a contributor of both lld and LLVM binary
> utilities (and the implementer of a bunch of GNU_PROPERTY changes), I
> hope that the LLVM community can be informed of such changes earlier.  A
> lot of people are not subscribed to any of the mailing lists (recently I
> visit the archives from time to time).

Yeah, we really need to do a better job coordinating and communicating.
Even though I am trying to keep up with these lists I am often
surprised by changes like this which seem to have just been added to
binutils without trying to get consensus with other GNU/ELF tool
implementations about the precise semantics or whether a feature is
simply redundant with existing practice.

Cheers,

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]