Skip to content

Commit b0db1ed

Browse files
ttabikees
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
1 parent cc9554e commit b0db1ed

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
@@ -291,8 +291,18 @@ typedef struct elf64_phdr {
291291
#define SHF_WRITE 0x1
292292
#define SHF_ALLOC 0x2
293293
#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
294301
#define SHF_RELA_LIVEPATCH 0x00100000
295302
#define SHF_RO_AFTER_INIT 0x00200000
303+
#define SHF_ORDERED 0x04000000
304+
#define SHF_EXCLUDE 0x08000000
305+
#define SHF_MASKOS 0x0ff00000
296306
#define SHF_MASKPROC 0xf0000000
297307

298308
/* special section indexes */

0 commit comments

Comments
 (0)