History

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.

Timur Tabi committed 1 year ago

Commit b0db1ed1 parent cc9554e1 file · +10 −0Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/elf.h+10−0
@@ -291,8 +291,18 @@ typedef struct elf64_phdr { · 290 unmodified lines
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 */