Skip to content

Commit f212b35

Browse files
committed
Fix BSS symbol data check in add_padding_symbols
1 parent 9c68155 commit f212b35

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/util/split.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,9 @@ fn add_padding_symbols(obj: &mut ObjInfo) -> Result<()> {
644644

645645
// Check if symbol is missing data between the end of the symbol and the next symbol
646646
let symbol_end = (symbol.address + symbol.size) as u32;
647-
if section.kind != ObjSectionKind::Code && next_address > symbol_end {
647+
if !matches!(section.kind, ObjSectionKind::Code | ObjSectionKind::Bss)
648+
&& next_address > symbol_end
649+
{
648650
let data = section.data_range(symbol_end, next_address)?;
649651
if data.iter().any(|&x| x != 0) {
650652
log::debug!(

0 commit comments

Comments
 (0)