mirror of
https://github.com/wiiu-env/wut.git
synced 2025-02-02 19:22:37 +01:00
elf2rpl: Remove fixBssNoBits transform.
Not needed since we updated linker script to have (NOLOAD)!
This commit is contained in:
parent
00b6fa3940
commit
c15e185762
@ -150,32 +150,6 @@ readElf(ElfFile &file, const std::string &filename)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Our linker script sometimes converts .bss from NOBITS to PROGBITS.
|
||||
*/
|
||||
static bool
|
||||
fixBssNoBits(ElfFile &file)
|
||||
{
|
||||
auto section = getSectionByName(file, ".bss");
|
||||
if (!section) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Ensure there is actually all 0 in the .bss section
|
||||
for (const auto c : section->data) {
|
||||
if (c) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Set type back to NOBITS
|
||||
section->header.type = elf::SHT_NOBITS;
|
||||
section->header.offset = 0u;
|
||||
section->data.clear();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reorder sections index.
|
||||
*
|
||||
@ -975,11 +949,6 @@ int main(int argc, char **argv)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!fixBssNoBits(elf)) {
|
||||
fmt::print("ERROR: fixBssNoBits failed.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!reorderSectionIndex(elf)) {
|
||||
fmt::print("ERROR: reorderSectionIndex failed.\n");
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user