From: Timur Tabi <ttabi@nvidia.com>
To: Kees Cook <kees@kernel.org>, <linux-kernel@vger.kernel.org>,
<kexec@lists.infradead.org>, Jessica Yu <jeyu@redhat.com>,
<binutils@sourceware.org>
Subject: [PATCH] elf: add remaining SHF_ flag macros
Date: Fri, 7 Mar 2025 11:14:17 -0600 [thread overview]
Message-ID: <20250307171417.267488-1-ttabi@nvidia.com> (raw)
Add the remaining SHF_ flags, as listed in the "Executable and
Linkable Format" Wikipedia page. This allows drivers to load and
parse ELF images that use some of those flags.
In particular, an upcoming change to the Nouveau GPU driver will
use some of the flags.
Signed-off-by: Timur Tabi <ttabi@nvidia.com>
---
include/uapi/linux/elf.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h
index b44069d29cec..6712c7a03596 100644
--- a/include/uapi/linux/elf.h
+++ b/include/uapi/linux/elf.h
@@ -291,8 +291,18 @@ typedef struct elf64_phdr {
#define SHF_WRITE 0x1
#define SHF_ALLOC 0x2
#define SHF_EXECINSTR 0x4
+#define SHF_MERGE 0x10
+#define SHF_STRINGS 0x20
+#define SHF_INFO_LINK 0x40
+#define SHF_LINK_ORDER 0x80
+#define SHF_OS_NONCONFORMING 0x100
+#define SHF_GROUP 0x200
+#define SHF_TLS 0x400
#define SHF_RELA_LIVEPATCH 0x00100000
#define SHF_RO_AFTER_INIT 0x00200000
+#define SHF_ORDERED 0x04000000
+#define SHF_EXCLUDE 0x08000000
+#define SHF_MASKOS 0x0ff00000
#define SHF_MASKPROC 0xf0000000
/* special section indexes */
base-commit: 5734411ec9f9cb6dcd0b3c627ae16b3011e6f4fe
prerequisite-patch-id: c4ea9bb93e2edfc4788c70e5057e5170dbf42a57
prerequisite-patch-id: 5abbe49499a6629f6f4389e86456308022771cb6
--
2.43.0
next reply other threads:[~2025-03-07 17:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-07 17:14 Timur Tabi [this message]
2025-03-07 20:23 ` Kees Cook
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=20250307171417.267488-1-ttabi@nvidia.com \
--to=ttabi@nvidia.com \
--cc=binutils@sourceware.org \
--cc=jeyu@redhat.com \
--cc=kees@kernel.org \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®