diff options
Diffstat (limited to 'elf.h')
-rw-r--r-- | elf.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -42,10 +42,10 @@ struct FileHeader uint32_t e_flags{}; uint16_t e_ehsize{0x40}; // size of this header uint16_t e_phentsize{0x38}; // size of program header - uint16_t e_phnum{1}; // 1 program header + uint16_t e_phnum{2}; // program headers: .text, .data uint16_t e_shentsize{0x40}; // size of section header - uint16_t e_shnum{3}; // number of section headers - uint16_t e_shstrndx{2}; // 1st section header contains section names + uint16_t e_shnum{4}; // number of section headers + uint16_t e_shstrndx{3}; // 1st section header contains section names }; // Segment @@ -76,7 +76,7 @@ struct SectionHeader }; #pragma pack(pop) -void Write(const std::filesystem::path& path, const std::vector<uint8_t>&); +void Write(const std::filesystem::path& path, const std::vector<uint8_t>& code, const std::vector<uint8_t>& data); std::vector<uint8_t> Read(const std::filesystem::path& path); } |