From: Dave Martin <Dave.Martin@arm.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Yu-cheng Yu <yu-cheng.yu@intel.com>,
Florian Weimer <fweimer@redhat.com>,
binutils@sourceware.org, linux-kernel@vger.kernel.org
Subject: ELF NT_GNU_PROPERTY_TYPE_0 Questions
Date: Thu, 22 Aug 2019 12:00:50 +0100 [thread overview]
Message-ID: <20190822110049.GE27757@arm.com> (raw)
Hi there,
Can you clarify a couple of points about the SysV ABI Linux
Extensions [1] for me?
1) Can there be more than one NT_GNU_PROPERTY_TYPE_0 note in a valid
ELF file? I think the answer should be "no".
2) Is is permissible for an ELF ET_EXEC or ET_DYN file that contains
an NT_GNU_PROPERTY_TYPE_0 property not to have a PT_GNU_PROPERTY phdrs
entry mapping it? Except for historical usage by RedHat (which
apparently can be worked round in userspace) it seems reasonable for
the answer to be "no", at least for Linux.
3) Is it permissible for the PT_GNU_PROPERTY phdr (if present) to
map anything other than precisely one NT_GNU_PROPERTY_TYPE_0
note? I think the answer should be "no".
4) Is an NT_GNU_PROPERTY_TYPE_0 note allowed to contain two or more
properties with the same pr_type? I think the answer should be "no".
5) What's the rationale for sorting the properties by pr_type? I can
see this would make it easier for the linker to merge
NT_GNU_PROPERTY_TYPE_0 notes from different files, but I'm wondering
whether the kernel really needs to enforce the ordering when loading
an ELF. The kernel doesn't need to merge property lists together.
6) Do you have a view on the best way to define the Elf_Prop type in
headers? bfd elf-bfd.h seems to have elf_property, but this doesn't
follow the style of the public ELF headers.
Maybe Linux should keep its definition internal rather than publishing
it in include/uapi/elf.h... I'm not sure.
Thanks
---Dave
[1] Linux Extensions to gABI
https://github.com/hjl-tools/linux-abi/wiki/Linux-Extensions-to-gABI
next reply other threads:[~2019-08-22 11:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-22 11:00 Dave Martin [this message]
2019-08-22 11:12 ` ELF NT_GNU_PROPERTY_TYPE_0 Questions 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=20190822110049.GE27757@arm.com \
--to=dave.martin@arm.com \
--cc=binutils@sourceware.org \
--cc=fweimer@redhat.com \
--cc=hjl.tools@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yu-cheng.yu@intel.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