Further Small Fixes
- Some improvements which is same as what has been made in the former commit has made
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use std::ffi::c_char;
|
||||
use std::ptr::null_mut;
|
||||
|
||||
use crate::{
|
||||
@@ -20,7 +21,7 @@ fn find_os_from_strtab_elf(elf: &Elf<'_>, pat: &[&str]) -> bool {
|
||||
.any(|s| pat.iter().any(|i| s.to_lowercase().contains(i)))
|
||||
}
|
||||
|
||||
fn find_os_elf(elf: &Elf<'_>, os_abi: u8) -> (ElfOS, *mut i8) {
|
||||
fn find_os_elf(elf: &Elf<'_>, os_abi: u8) -> (ElfOS, *mut c_char) {
|
||||
let os = {
|
||||
match os_abi {
|
||||
0x00 => match true {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use std::ffi::c_char;
|
||||
use crate::{
|
||||
debug::{debug_objects, merge_members},
|
||||
structs::{CharVec, Debugging, ParsingError, ULDDObj, ULDDObjResult},
|
||||
@@ -11,7 +12,7 @@ use std::ptr::null_mut;
|
||||
use crate::debug::option_to_c_string;
|
||||
use crate::impls::{ErrorToInt, StringToCString};
|
||||
|
||||
fn find_os_mach(mach: &MachO<'_>) -> *mut i8 {
|
||||
fn find_os_mach(mach: &MachO<'_>) -> *mut c_char {
|
||||
for lc in &mach.load_commands {
|
||||
if let BuildVersion(build_version) = lc.command {
|
||||
let os = match build_version.platform {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use std::ffi::c_char;
|
||||
use crate::{
|
||||
debug::debug_objects,
|
||||
structs::{CharVec, ParsingError, ULDDObj, ULDDObjResult},
|
||||
@@ -8,7 +9,7 @@ use std::ptr::null_mut;
|
||||
use crate::debug::option_to_c_string;
|
||||
use crate::impls::StringToCString;
|
||||
|
||||
fn find_os_pe(pe: &PE<'_>) -> *mut i8 {
|
||||
fn find_os_pe(pe: &PE<'_>) -> *mut c_char {
|
||||
let Some(optional_header) = pe
|
||||
.header
|
||||
.optional_header
|
||||
|
||||
Reference in New Issue
Block a user