Sum all .bss* sections when counting bss size.

This commit is contained in:
Unknown W. Brackets committed 2014-08-17 14:25:58 -07:00
1 parent 0a14fd5ee9
commit 71e8c0f6e0
3 files changed
+15 -9

No files matched your search

+1 -6
View File
@@ -994,12 +994,7 @@ Module *__KernelLoadELFFromPtr(const u8 *ptr, u32 loadAddress, bool fromTop, std
module->nm.text_size = 0;
}
SectionID bssSection = reader.GetSectionByName(".bss");
if (bssSection != -1) {
module->nm.bss_size = reader.GetSectionSize(bssSection);
} else {
module->nm.bss_size = 0;
}
module->nm.bss_size = reader.GetTotalSectionSizeByPrefix(".bss");
module->nm.data_size = reader.GetTotalDataSize() - module->nm.bss_size;
INFO_LOG(LOADER, "Module %s: %08x %08x %08x", modinfo->name, modinfo->gp, modinfo->libent, modinfo->libstub);