Files
elf-viewer/elf_header.h
T

37 lines
691 B
C

#ifndef ELF_HEADER_H
#define ELF_HEADER_H
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include "elf_osabi.h"
typedef struct elf_header ELFHeader;
ELFHeader* ParseObjectFile(const char* bytes, size_t size);
typedef enum ELFType{
ET_None = 0, //No file type
ET_Rel = 1, //Relocatable file
ET_Exec = 2, //Executable file
ET_Dyn = 3, //Shared object file
ET_Core = 4, //Core file
ET_LOProc = 0xff00, //Processor
ET_HIProc = 0xffff //Specific
} ELFType;
typedef enum ELFMachine
{
EM_None = 0,
EM_M32 = 1, //AT&T WE 32100
EM_Sparc = 2,
EM_386 = 3,
EM_68k = 4,
EM_88k = 5,
EM_860 = 7,
EM_MIPS = 8,
EM_X86_64 = 62
} ELFMachine;
#endif