Skip to content

Commit 579cfab

Browse files
committed
elf: add remaining SHF_ flag macros
JIRA: https://issues.redhat.com/browse/RHEL-113204 commit b0db1ed Author: Timur Tabi <ttabi@nvidia.com> Date: Fri Mar 7 11:14:17 2025 -0600 elf: add remaining SHF_ flag macros Add the remaining SHF_ flags, as listed in the "Executable and Linkable Format" Wikipedia page and the System V Application Binary Interface[1]. 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. Link: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.sheader.html#sh_flags [1] Signed-off-by: Timur Tabi <ttabi@nvidia.com> Link: https://lore.kernel.org/r/20250307171417.267488-1-ttabi@nvidia.com Signed-off-by: Kees Cook <kees@kernel.org> Signed-off-by: José Expósito <jexposit@redhat.com>
1 parent df8ce83 commit 579cfab

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

include/uapi/linux/elf.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,18 @@ typedef struct elf64_phdr {
290290
#define SHF_WRITE 0x1
291291
#define SHF_ALLOC 0x2
292292
#define SHF_EXECINSTR 0x4
293+
#define SHF_MERGE 0x10
294+
#define SHF_STRINGS 0x20
295+
#define SHF_INFO_LINK 0x40
296+
#define SHF_LINK_ORDER 0x80
297+
#define SHF_OS_NONCONFORMING 0x100
298+
#define SHF_GROUP 0x200
299+
#define SHF_TLS 0x400
293300
#define SHF_RELA_LIVEPATCH 0x00100000
294301
#define SHF_RO_AFTER_INIT 0x00200000
302+
#define SHF_ORDERED 0x04000000
303+
#define SHF_EXCLUDE 0x08000000
304+
#define SHF_MASKOS 0x0ff00000
295305
#define SHF_MASKPROC 0xf0000000
296306

297307
/* special section indexes */

0 commit comments

Comments
 (0)