Preliminary SuperH support (#186)

* Preliminary SuperH support

* fixes

* clippy

* clippy
This commit is contained in:
sozud
2025-04-17 13:20:30 -07:00
committed by GitHub
parent b40fae5140
commit 644d4762f0
5 changed files with 2026 additions and 3 deletions
Generated
+10 -2
View File
@@ -475,7 +475,7 @@ dependencies = [
"cfg-if",
"libc",
"miniz_oxide",
"object",
"object 0.36.7 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-demangle",
"windows-targets 0.52.6",
]
@@ -3353,7 +3353,7 @@ dependencies = [
"notify-debouncer-full",
"num-traits",
"objdiff-core",
"object",
"object 0.36.7 (git+https://github.com/gimli-rs/object?rev=a74579249e21ab8fcd3a86be588de336f18297cb)",
"pbjson",
"pbjson-build",
"ppc750cl",
@@ -3440,6 +3440,14 @@ dependencies = [
"memchr",
]
[[package]]
name = "object"
version = "0.36.7"
source = "git+https://github.com/gimli-rs/object?rev=a74579249e21ab8fcd3a86be588de336f18297cb#a74579249e21ab8fcd3a86be588de336f18297cb"
dependencies = [
"memchr",
]
[[package]]
name = "once_cell"
version = "1.21.3"
+5 -1
View File
@@ -27,6 +27,7 @@ all = [
"mips",
"ppc",
"x86",
"superh"
]
# Implicit, used to check if any arch is enabled
any-arch = [
@@ -111,6 +112,9 @@ arm64 = [
"dep:yaxpeax-arch",
"dep:yaxpeax-arm",
]
superh = [
"any-arch",
]
[package.metadata.docs.rs]
features = ["all"]
@@ -123,7 +127,7 @@ itertools = { version = "0.14", default-features = false, features = ["use_alloc
log = { version = "0.4", default-features = false, optional = true }
memmap2 = { version = "0.9", optional = true }
num-traits = { version = "0.2", default-features = false, optional = true }
object = { version = "0.36", default-features = false, features = ["read_core", "elf", "pe"] }
object = { git = "https://github.com/gimli-rs/object", rev = "a74579249e21ab8fcd3a86be588de336f18297cb", default-features = false, features = ["read_core", "elf", "pe"] }
pbjson = { version = "0.7", default-features = false, optional = true }
prost = { version = "0.13", default-features = false, features = ["prost-derive"], optional = true }
regex = { version = "1.11", default-features = false, features = [], optional = true }
+4
View File
@@ -25,6 +25,8 @@ pub mod arm64;
pub mod mips;
#[cfg(feature = "ppc")]
pub mod ppc;
#[cfg(feature = "superh")]
pub mod superh;
#[cfg(feature = "x86")]
pub mod x86;
@@ -313,6 +315,8 @@ pub fn new_arch(object: &object::File) -> Result<Box<dyn Arch>> {
object::Architecture::Arm => Box::new(arm::ArchArm::new(object)?),
#[cfg(feature = "arm64")]
object::Architecture::Aarch64 => Box::new(arm64::ArchArm64::new(object)?),
#[cfg(feature = "superh")]
object::Architecture::SuperH => Box::new(superh::ArchSuperH::new(object)?),
arch => bail!("Unsupported architecture: {arch:?}"),
})
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff