mirror of
https://github.com/wiiu-env/wut.git
synced 2024-12-13 09:22:38 +01:00
elf2rpl: Remove fixSectionAlign.
Not needed.
This commit is contained in:
parent
c15e185762
commit
ae70d3a4a9
@ -563,30 +563,6 @@ fixFileHeader(ElfFile &file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fix the .addralign field for sections.
|
|
||||||
*/
|
|
||||||
static bool
|
|
||||||
fixSectionAlign(ElfFile &file)
|
|
||||||
{
|
|
||||||
for (auto §ion : file.sections) {
|
|
||||||
if (section->header.type == elf::SHT_PROGBITS) {
|
|
||||||
section->header.addralign = 32u;
|
|
||||||
} else if (section->header.type == elf::SHT_NOBITS) {
|
|
||||||
section->header.addralign = 64u;
|
|
||||||
} else if (section->header.type == elf::SHT_RPL_IMPORTS) {
|
|
||||||
section->header.addralign = 4u;
|
|
||||||
} else if (section->header.type == elf::SHT_RPL_EXPORTS) {
|
|
||||||
section->header.addralign = 4u;
|
|
||||||
} else if (section->header.type == elf::SHT_STRTAB) {
|
|
||||||
section->header.addralign = 1u;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* .rodate requires W flag.
|
* .rodate requires W flag.
|
||||||
*/
|
*/
|
||||||
@ -959,11 +935,6 @@ int main(int argc, char **argv)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fixSectionAlign(elf)) {
|
|
||||||
fmt::print("ERROR: fixSectionAlign failed.\n");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!fixLoaderVirtualAddresses(elf)) {
|
if (!fixLoaderVirtualAddresses(elf)) {
|
||||||
fmt::print("ERROR: fixLoaderVirtualAddresses failed.\n");
|
fmt::print("ERROR: fixLoaderVirtualAddresses failed.\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user