From 4eb24311d9d8bcc4a705929f320466602daa37d3 Mon Sep 17 00:00:00 2001 From: OndrikB Date: Sat, 10 Aug 2024 21:16:33 +0200 Subject: [PATCH] write/coff: Set checksum for BSS section symbols --- src/write/coff/object.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/write/coff/object.rs b/src/write/coff/object.rs index f70465f3..8f36d9d0 100644 --- a/src/write/coff/object.rs +++ b/src/write/coff/object.rs @@ -654,7 +654,12 @@ impl<'a> Object<'a> { length: section.size as u32, number_of_relocations: section.relocations.len() as u32, number_of_linenumbers: 0, - check_sum: checksum(section.data()), + check_sum: if section.is_bss() { + 0 + } + else { + checksum(section.data()) + }, number: section_offsets[section_index].associative_section, selection: section_offsets[section_index].selection, });