Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Timur Tabi and committed by
Kees Cook
b0db1ed1 cc9554e6

+10
+10
include/uapi/linux/elf.h
··· 291 291 #define SHF_WRITE 0x1 292 292 #define SHF_ALLOC 0x2 293 293 #define SHF_EXECINSTR 0x4 294 + #define SHF_MERGE 0x10 295 + #define SHF_STRINGS 0x20 296 + #define SHF_INFO_LINK 0x40 297 + #define SHF_LINK_ORDER 0x80 298 + #define SHF_OS_NONCONFORMING 0x100 299 + #define SHF_GROUP 0x200 300 + #define SHF_TLS 0x400 294 301 #define SHF_RELA_LIVEPATCH 0x00100000 295 302 #define SHF_RO_AFTER_INIT 0x00200000 303 + #define SHF_ORDERED 0x04000000 304 + #define SHF_EXCLUDE 0x08000000 305 + #define SHF_MASKOS 0x0ff00000 296 306 #define SHF_MASKPROC 0xf0000000 297 307 298 308 /* special section indexes */