diff --git a/tools/elf2rpl/main.cpp b/tools/elf2rpl/main.cpp index b5c58e2..f1548b0 100644 --- a/tools/elf2rpl/main.cpp +++ b/tools/elf2rpl/main.cpp @@ -405,7 +405,7 @@ generateFileInfoSection(ElfFile &file) static bool generateCrcSection(ElfFile &file) { - std::vector crcs; + std::vector> crcs; for (auto §ion : file.sections) { auto crc = uint32_t { 0u }; @@ -417,6 +417,9 @@ generateCrcSection(ElfFile &file) crcs.push_back(crc); } + // Insert a 0 crc for this section + crcs.insert(crcs.end() - 1, 0); + auto section = std::make_unique(); section->header.name = 0u; section->header.type = elf::SHT_RPL_CRCS;