m4b / goblin

An impish, cross-platform binary parsing crate, written in Rust
MIT License
1.2k stars 160 forks source link

is_relocation() checks for SHT_RELA but not SHT_REL #246

Open tux3 opened 3 years ago

tux3 commented 3 years ago

The code for SectionHeader::is_relocation() checks for SHT_RELA but not SHT_REL:

pub fn is_relocation(&self) -> bool {
    self.sh_type == SHT_RELA
}

Apologies if this is some dark corner of the spec that I misunderstood, but as I understand it both SHT_REL and SHT_RELA should be valid relocation sections.

Thanks!