24 lines
510 B
C
24 lines
510 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;
|
|
|
|
#endif |