2023-03-10 10:32:50 +00:00
|
|
|
// This file is part of noxos and licensed under the MIT open source license
|
2023-02-28 20:13:51 +00:00
|
|
|
|
|
|
|
#ifndef NOX_SECTION_H
|
|
|
|
#define NOX_SECTION_H
|
|
|
|
|
|
|
|
#include "utils/stdtypes.h"
|
|
|
|
#include "utils/string.h"
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
ELF_SECTION_NULL,
|
|
|
|
ELF_SECTION_PROGRAM_DATA,
|
|
|
|
ELF_SECTION_SYMBOL_TABLE,
|
|
|
|
ELF_SECTION_STRING_TABLE,
|
|
|
|
ELF_SECTION_RELOCATION_A,
|
|
|
|
ELF_SECTION_HASH,
|
2023-05-30 22:16:25 +00:00
|
|
|
ELF_SECTION_DYNAMIC,
|
2023-02-28 20:13:51 +00:00
|
|
|
ELF_SECTION_NOTE,
|
2023-03-02 16:58:04 +00:00
|
|
|
ELF_SECTION_NOBITS,
|
|
|
|
|
|
|
|
ELF_SECTION_ENUM_END
|
2023-02-28 20:13:51 +00:00
|
|
|
} elf_section_type_E;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint32_t name_offset;
|
|
|
|
uint32_t type;
|
|
|
|
uint64_t flags;
|
|
|
|
uint64_t virtual_address;
|
|
|
|
uint64_t offset;
|
|
|
|
uint64_t length;
|
|
|
|
uint32_t link;
|
|
|
|
uint32_t info;
|
|
|
|
uint64_t alignment;
|
|
|
|
uint64_t entry_size;
|
|
|
|
} elf_section_T;
|
|
|
|
|
2023-03-02 16:58:04 +00:00
|
|
|
extern string_t g_elf_section_type_strings[ELF_SECTION_ENUM_END+1];
|
2023-02-28 20:13:51 +00:00
|
|
|
|
|
|
|
#endif //NOX_SECTION_H
|