From b32f51ce498446f60a932a009cbeff4f0e96bb1d Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 1 Nov 2016 09:48:18 +0100 Subject: [PATCH] elf.h: add ELFMAG* constants Needed by libelf, when elf.h exists. --- headers/os/kernel/elf.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/headers/os/kernel/elf.h b/headers/os/kernel/elf.h index f3f404b6cd..ad344ad4ad 100644 --- a/headers/os/kernel/elf.h +++ b/headers/os/kernel/elf.h @@ -75,9 +75,6 @@ typedef struct { #endif } Elf64_Ehdr; -#define ELFMAG "\x7f""ELF" -#define SELFMAG 4 - /* e_ident[] indices */ #define EI_MAG0 0 #define EI_MAG1 1 @@ -88,6 +85,14 @@ typedef struct { #define EI_VERSION 6 #define EI_PAD 7 +/* Values for the magic number bytes. */ +#define ELFMAG0 0x7f +#define ELFMAG1 'E' +#define ELFMAG2 'L' +#define ELFMAG3 'F' +#define ELFMAG "\x7f""ELF" +#define SELFMAG 4 + /* e_type (Object file type) */ #define ET_NONE 0 /* No file type */ #define ET_REL 1 /* Relocatable file */