elf.h: add ELFMAG* constants

Needed by libelf, when elf.h exists.
This commit is contained in:
Adrien Destugues 2016-11-01 09:48:18 +01:00
parent 7e9b90f7e4
commit b32f51ce49

View File

@ -75,9 +75,6 @@ typedef struct {
#endif #endif
} Elf64_Ehdr; } Elf64_Ehdr;
#define ELFMAG "\x7f""ELF"
#define SELFMAG 4
/* e_ident[] indices */ /* e_ident[] indices */
#define EI_MAG0 0 #define EI_MAG0 0
#define EI_MAG1 1 #define EI_MAG1 1
@ -88,6 +85,14 @@ typedef struct {
#define EI_VERSION 6 #define EI_VERSION 6
#define EI_PAD 7 #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) */ /* e_type (Object file type) */
#define ET_NONE 0 /* No file type */ #define ET_NONE 0 /* No file type */
#define ET_REL 1 /* Relocatable file */ #define ET_REL 1 /* Relocatable file */