mirror of
https://github.com/wiiu-env/wut.git
synced 2025-01-05 21:18:15 +01:00
elf2rpl: Set file offset to 0 for the SHT_NOBITS and SHT_NULL sections.
This commit is contained in:
parent
400318c3d1
commit
b6c024fc5c
@ -569,6 +569,14 @@ calculateSectionOffsets(ElfFile &file)
|
||||
auto offset = file.header.shoff;
|
||||
offset += align_up(static_cast<uint32_t>(file.sections.size() * sizeof(elf::SectionHeader)), 64);
|
||||
|
||||
for (auto §ion : file.sections) {
|
||||
if (section->header.type == elf::SHT_NOBITS ||
|
||||
section->header.type == elf::SHT_NULL) {
|
||||
section->header.offset = 0u;
|
||||
section->data.clear();
|
||||
}
|
||||
}
|
||||
|
||||
for (auto §ion : file.sections) {
|
||||
if (section->header.type == elf::SHT_RPL_CRCS) {
|
||||
section->header.offset = offset;
|
||||
|
Loading…
Reference in New Issue
Block a user