35 lines
767 B
C
35 lines
767 B
C
// This file is part of noxos and licensed under the MIT open source license
|
|
|
|
#ifndef NOX_SEGMENT_H
|
|
#define NOX_SEGMENT_H
|
|
|
|
#include "utils/stdtypes.h"
|
|
#include "utils/string.h"
|
|
|
|
typedef enum {
|
|
ELF_SEGMENT_NULL,
|
|
ELF_SEGMENT_LOAD,
|
|
ELF_SEGMENT_DYNAMIC,
|
|
ELF_SEGMENT_INTERPRETER,
|
|
ELF_SEGMENT_NOTE,
|
|
ELF_SEGMENT_PROGRAM_HEADER_TABLE,
|
|
ELF_SEGMENT_TLS,
|
|
|
|
ELF_SEGMENT_ENUM_END
|
|
} elf_segment_type_E;
|
|
|
|
typedef struct {
|
|
uint32_t type;
|
|
uint32_t flags;
|
|
uint64_t offset;
|
|
uint64_t address_virtual;
|
|
uint64_t address_physical;
|
|
uint64_t length_file;
|
|
uint64_t length_memory;
|
|
uint64_t align;
|
|
} elf_segment_T;
|
|
|
|
extern string_t g_elf_segment_type_strings[ELF_SEGMENT_ENUM_END+1];
|
|
|
|
#endif //NOX_SEGMENT_H
|