mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-11-28 16:43:20 -08:00
fix PE initialized data size
This commit is contained in:
1 parent
e283952994
commit
d1171dcabb
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -5380,7 +5380,7 @@ lnk_build_win32_header(Arena *arena, LNK_SymbolTable *symtab, LNK_Config *config
|
|||||||
if (sect->flags & COFF_SectionFlag_CntUninitializedData) {
|
if (sect->flags & COFF_SectionFlag_CntUninitializedData) {
|
||||||
sizeof_uninited_data += sect->vsize;
|
sizeof_uninited_data += sect->vsize;
|
||||||
}
|
}
|
||||||
if ((sect->flags & COFF_SectionFlag_CntInitializedData) || (sect->flags & COFF_SectionFlag_CntCode)) {
|
if (sect->flags & COFF_SectionFlag_CntInitializedData) {
|
||||||
sizeof_inited_data += sect->fsize;
|
sizeof_inited_data += sect->fsize;
|
||||||
}
|
}
|
||||||
if (sect->flags & COFF_SectionFlag_CntCode) {
|
if (sect->flags & COFF_SectionFlag_CntCode) {
|
||||||
|
|||||||
@@ -554,7 +554,7 @@ TEST(simple_link_test)
|
|||||||
|
|
||||||
PE_OptionalHeader32Plus *opt = str8_deserial_get_raw_ptr(exe, pe.optional_header_off, sizeof(*opt));
|
PE_OptionalHeader32Plus *opt = str8_deserial_get_raw_ptr(exe, pe.optional_header_off, sizeof(*opt));
|
||||||
T_Ok(opt->sizeof_code == text_section->fsize);
|
T_Ok(opt->sizeof_code == text_section->fsize);
|
||||||
T_Ok(opt->sizeof_inited_data == (text_section->fsize + data_section->fsize));
|
T_Ok(opt->sizeof_inited_data == data_section->fsize);
|
||||||
T_Ok(opt->sizeof_uninited_data == 0x200);
|
T_Ok(opt->sizeof_uninited_data == 0x200);
|
||||||
T_Ok(opt->code_base == 0x1000);
|
T_Ok(opt->code_base == 0x1000);
|
||||||
T_Ok(opt->image_base == 0x140000000);
|
T_Ok(opt->image_base == 0x140000000);
|
||||||
|
|||||||
Reference in new issue
Block a user