tianole/include/tianole/elf.h
Microindole e3782144b8
refactor(build): split makefiles and normalize internal API names
- align makefile layout with Linux-style directories
2026-05-08 21:00:24 +08:00

45 lines
678 B
C

#ifndef ELF_H
#define ELF_H
#include <stdint.h>
#define ELF_MAGIC 0x464c457fu
#define ELFCLASS64 2
#define ELFDATA2LSB 1
#define EV_CURRENT 1
#define ET_EXEC 2
#define EM_X86_64 62
#define PT_LOAD 1
typedef struct {
unsigned char ident[16];
uint16_t type;
uint16_t machine;
uint32_t version;
uint64_t entry;
uint64_t phoff;
uint64_t shoff;
uint32_t flags;
uint16_t ehsize;
uint16_t phentsize;
uint16_t phnum;
uint16_t shentsize;
uint16_t shnum;
uint16_t shstrndx;
} elf64_ehdr_t;
typedef struct {
uint32_t type;
uint32_t flags;
uint64_t offset;
uint64_t vaddr;
uint64_t paddr;
uint64_t filesz;
uint64_t memsz;
uint64_t align;
} elf64_phdr_t;
#endif