Skip to content

Commit

Permalink
fix for ELF loading
Browse files Browse the repository at this point in the history
  • Loading branch information
morganthomas committed Jun 6, 2024
1 parent a39c986 commit 9d4eb08
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion elf/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ pub fn load_elf_object_file(file: Vec<u8>) -> Program {
&& section_header.sh_flags == (abi::SHF_ALLOC | abi::SHF_WRITE).into();
let is_rodata: bool = section_header.sh_type == abi::SHT_PROGBITS
&& (section_header.sh_flags == abi::SHF_ALLOC.into()
|| section_header.sh_flags == 0x32); // TODO: what is 0x32?
|| section_header.sh_flags == 0x32 // TODO: what is 0x32?
|| section_header.sh_flags == 0x12); // TODO: what is 0x12?
let is_bss: bool = section_header.sh_type == abi::SHT_NOBITS
&& section_header.sh_flags == (abi::SHF_ALLOC | abi::SHF_WRITE).into();
let is_text: bool = section_header.sh_type == abi::SHT_PROGBITS
Expand Down

0 comments on commit 9d4eb08

Please sign in to comment.