Skip to content

Commit

Permalink
don't mark SHT_NOBITS sections in file
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslashev committed Jun 8, 2021
1 parent 3968793 commit 2706685
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/elf/elfxx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ where
let parsed = Self::parse_shdr(buf, endianness, &shdr)?;
let ranges = &mut elf.ranges;

if parsed.file_offset != 0 && parsed.size != 0 {
if parsed.file_offset != 0 && parsed.size != 0 && parsed.shtype != SHT_NOBITS {
ranges.add_range(parsed.file_offset, parsed.size, RangeType::Section(i));
}

Expand Down

0 comments on commit 2706685

Please sign in to comment.