mirror of
https://github.com/encounter/objdiff.git
synced 2025-06-08 07:33:39 +00:00
Compare commits
No commits in common. "main" and "v3.0.0-beta.4" have entirely different histories.
main
...
v3.0.0-bet
@ -1,4 +1,5 @@
|
|||||||
# statically link the C runtime so the executable does not depend on
|
[target.x86_64-pc-windows-msvc]
|
||||||
# that shared/dynamic library.
|
linker = "rust-lld"
|
||||||
[target.'cfg(all(target_env = "msvc", target_os = "windows"))']
|
|
||||||
rustflags = ["-C", "target-feature=+crt-static"]
|
[target.aarch64-pc-windows-msvc]
|
||||||
|
linker = "rust-lld"
|
||||||
|
93
.github/workflows/build.yaml
vendored
93
.github/workflows/build.yaml
vendored
@ -8,10 +8,6 @@ on:
|
|||||||
- "LICENSE*"
|
- "LICENSE*"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
|
||||||
# For npm publish provenance
|
|
||||||
id-token: write
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BUILD_PROFILE: release-lto
|
BUILD_PROFILE: release-lto
|
||||||
CARGO_INCREMENTAL: 0
|
CARGO_INCREMENTAL: 0
|
||||||
@ -76,7 +72,7 @@ jobs:
|
|||||||
name: Test
|
name: Test
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform: [ ubuntu-latest, windows-latest, macos-latest ]
|
platform: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
@ -253,30 +249,22 @@ jobs:
|
|||||||
components: rust-src
|
components: rust-src
|
||||||
- name: Cache Rust workspace
|
- name: Cache Rust workspace
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
- name: Setup Node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: lts/*
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm -C objdiff-wasm ci
|
run: npm -C objdiff-wasm install
|
||||||
- name: Build
|
- name: Build
|
||||||
run: npm -C objdiff-wasm run build
|
run: npm -C objdiff-wasm run build
|
||||||
- name: Upload artifacts
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: wasm
|
|
||||||
path: objdiff-wasm/dist/
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
check-version:
|
release:
|
||||||
name: Check package versions
|
name: Release
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [ build-cli, build-gui, build-wasm ]
|
needs: [build-cli, build-gui]
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Check git tag against package versions
|
- name: Check git tag against Cargo version
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -eou pipefail
|
set -eou pipefail
|
||||||
@ -288,24 +276,9 @@ jobs:
|
|||||||
echo "::error::Git tag doesn't match the Cargo version! ($tag != $version)"
|
echo "::error::Git tag doesn't match the Cargo version! ($tag != $version)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
version="v$(jq -r .version objdiff-wasm/package.json)"
|
|
||||||
if [ "$tag" != "$version" ]; then
|
|
||||||
echo "::error::Git tag doesn't match the npm version! ($tag != $version)"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
release-github:
|
|
||||||
name: Release (GitHub)
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [ check-version ]
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
steps:
|
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
pattern: objdiff-*
|
|
||||||
path: artifacts
|
path: artifacts
|
||||||
- name: Rename artifacts
|
- name: Rename artifacts
|
||||||
working-directory: artifacts
|
working-directory: artifacts
|
||||||
@ -335,53 +308,3 @@ jobs:
|
|||||||
files: out/*
|
files: out/*
|
||||||
draft: true
|
draft: true
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
|
|
||||||
release-cargo:
|
|
||||||
name: Release (Cargo)
|
|
||||||
if: 'false' # TODO re-enable when all dependencies are published
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [ check-version ]
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Setup Rust toolchain
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
- name: Publish
|
|
||||||
env:
|
|
||||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
|
||||||
run: cargo publish -p objdiff-core
|
|
||||||
|
|
||||||
release-npm:
|
|
||||||
name: Release (npm)
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [ check-version ]
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Setup Node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: lts/*
|
|
||||||
registry-url: 'https://registry.npmjs.org'
|
|
||||||
- name: Download artifacts
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: wasm
|
|
||||||
path: objdiff-wasm/dist
|
|
||||||
- name: Publish
|
|
||||||
working-directory: objdiff-wasm
|
|
||||||
env:
|
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
version=$(jq -r '.version' package.json)
|
|
||||||
tag="latest"
|
|
||||||
# Check for prerelease by looking for a dash
|
|
||||||
case "$version" in
|
|
||||||
*-*)
|
|
||||||
tag=$(echo "$version" | sed -e 's/^[^-]*-//' -e 's/\..*$//')
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
echo "Publishing version $version with tag '$tag'..."
|
|
||||||
npm publish --provenance --access public --tag "$tag"
|
|
||||||
|
1292
Cargo.lock
generated
1292
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -14,7 +14,7 @@ strip = "debuginfo"
|
|||||||
codegen-units = 1
|
codegen-units = 1
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "3.0.0-beta.9"
|
version = "3.0.0-beta.4"
|
||||||
authors = ["Luke Street <luke@street.dev>"]
|
authors = ["Luke Street <luke@street.dev>"]
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
|
@ -16,12 +16,11 @@ Features:
|
|||||||
|
|
||||||
Supports:
|
Supports:
|
||||||
|
|
||||||
- ARM (GBA, DS, 3DS)
|
- PowerPC 750CL (GameCube, Wii)
|
||||||
- ARM64 (Switch)
|
|
||||||
- MIPS (N64, PS1, PS2, PSP)
|
- MIPS (N64, PS1, PS2, PSP)
|
||||||
- PowerPC (GameCube, Wii)
|
- x86 (COFF only at the moment)
|
||||||
- SuperH (Saturn, Dreamcast)
|
- ARM (GBA, DS, 3DS)
|
||||||
- x86 (COFF only)
|
- ARM64 (Switch, experimental)
|
||||||
|
|
||||||
See [Usage](#usage) for more information.
|
See [Usage](#usage) for more information.
|
||||||
|
|
||||||
|
@ -175,10 +175,6 @@
|
|||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "If true, objdiff will run the build command with the context file as an argument to generate it.",
|
"description": "If true, objdiff will run the build command with the context file as an argument to generate it.",
|
||||||
"default": false
|
"default": false
|
||||||
},
|
|
||||||
"preset_id": {
|
|
||||||
"type": "number",
|
|
||||||
"description": "The decomp.me preset ID to use for the scratch.\nCompiler and flags in the config will take precedence over the preset, but the preset is useful for organizational purposes."
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
@ -103,7 +103,6 @@ allow = [
|
|||||||
"0BSD",
|
"0BSD",
|
||||||
"OFL-1.1",
|
"OFL-1.1",
|
||||||
"Ubuntu-font-1.0",
|
"Ubuntu-font-1.0",
|
||||||
"CDLA-Permissive-2.0",
|
|
||||||
]
|
]
|
||||||
# The confidence threshold for detecting a license from license text.
|
# The confidence threshold for detecting a license from license text.
|
||||||
# The higher the value, the more closely the license text must be to the
|
# The higher the value, the more closely the license text must be to the
|
||||||
@ -241,6 +240,8 @@ allow-git = []
|
|||||||
[sources.allow-org]
|
[sources.allow-org]
|
||||||
# github.com organizations to allow git sources for
|
# github.com organizations to allow git sources for
|
||||||
github = [
|
github = [
|
||||||
|
"CelestialAmber", # cwextab, rlwinmdec
|
||||||
|
"Decompollaborate", # rabbitizer
|
||||||
"enarx", # flagset
|
"enarx", # flagset
|
||||||
"encounter",
|
"encounter",
|
||||||
]
|
]
|
||||||
|
@ -28,7 +28,7 @@ supports-color = "3.0"
|
|||||||
time = { version = "0.3", features = ["formatting", "local-offset"] }
|
time = { version = "0.3", features = ["formatting", "local-offset"] }
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||||
typed-path = "0.11"
|
typed-path = "0.10"
|
||||||
|
|
||||||
[target.'cfg(target_env = "musl")'.dependencies]
|
[target.'cfg(target_env = "musl")'.dependencies]
|
||||||
mimalloc = "0.1"
|
mimalloc = "0.1"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
use std::{
|
use std::{
|
||||||
io::stdout,
|
io::stdout,
|
||||||
mem,
|
mem,
|
||||||
|
str::FromStr,
|
||||||
sync::{
|
sync::{
|
||||||
Arc,
|
Arc,
|
||||||
atomic::{AtomicBool, Ordering},
|
atomic::{AtomicBool, Ordering},
|
||||||
@ -28,7 +29,10 @@ use objdiff_core::{
|
|||||||
ProjectConfig, ProjectObject, ProjectObjectMetadata, build_globset,
|
ProjectConfig, ProjectObject, ProjectObjectMetadata, build_globset,
|
||||||
path::{check_path_buf, platform_path, platform_path_serde_option},
|
path::{check_path_buf, platform_path, platform_path_serde_option},
|
||||||
},
|
},
|
||||||
diff::{self, DiffObjConfig, MappingConfig, ObjectDiff},
|
diff::{
|
||||||
|
self, ConfigEnum, ConfigPropertyId, ConfigPropertyKind, DiffObjConfig, MappingConfig,
|
||||||
|
ObjectDiff,
|
||||||
|
},
|
||||||
jobs::{
|
jobs::{
|
||||||
Job, JobQueue, JobResult,
|
Job, JobQueue, JobResult,
|
||||||
objdiff::{ObjDiffConfig, start_build},
|
objdiff::{ObjDiffConfig, start_build},
|
||||||
@ -39,7 +43,6 @@ use ratatui::prelude::*;
|
|||||||
use typed_path::{Utf8PlatformPath, Utf8PlatformPathBuf};
|
use typed_path::{Utf8PlatformPath, Utf8PlatformPathBuf};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
cmd::apply_config_args,
|
|
||||||
util::{
|
util::{
|
||||||
output::{OutputFormat, write_output},
|
output::{OutputFormat, write_output},
|
||||||
term::crossterm_panic_handler,
|
term::crossterm_panic_handler,
|
||||||
@ -180,7 +183,28 @@ pub fn run(args: Args) -> Result<()> {
|
|||||||
|
|
||||||
fn build_config_from_args(args: &Args) -> Result<(DiffObjConfig, MappingConfig)> {
|
fn build_config_from_args(args: &Args) -> Result<(DiffObjConfig, MappingConfig)> {
|
||||||
let mut diff_config = DiffObjConfig::default();
|
let mut diff_config = DiffObjConfig::default();
|
||||||
apply_config_args(&mut diff_config, &args.config)?;
|
for config in &args.config {
|
||||||
|
let (key, value) = config.split_once('=').context("--config expects \"key=value\"")?;
|
||||||
|
let property_id = ConfigPropertyId::from_str(key)
|
||||||
|
.map_err(|()| anyhow!("Invalid configuration property: {}", key))?;
|
||||||
|
diff_config.set_property_value_str(property_id, value).map_err(|()| {
|
||||||
|
let mut options = String::new();
|
||||||
|
match property_id.kind() {
|
||||||
|
ConfigPropertyKind::Boolean => {
|
||||||
|
options = "true, false".to_string();
|
||||||
|
}
|
||||||
|
ConfigPropertyKind::Choice(variants) => {
|
||||||
|
for (i, variant) in variants.iter().enumerate() {
|
||||||
|
if i > 0 {
|
||||||
|
options.push_str(", ");
|
||||||
|
}
|
||||||
|
options.push_str(variant.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
anyhow!("Invalid value for {}. Expected one of: {}", property_id.name(), options)
|
||||||
|
})?;
|
||||||
|
}
|
||||||
let mut mapping_config = MappingConfig {
|
let mut mapping_config = MappingConfig {
|
||||||
mappings: Default::default(),
|
mappings: Default::default(),
|
||||||
selecting_left: args.selecting_left.clone(),
|
selecting_left: args.selecting_left.clone(),
|
||||||
|
@ -1,33 +1,2 @@
|
|||||||
pub mod diff;
|
pub mod diff;
|
||||||
pub mod report;
|
pub mod report;
|
||||||
|
|
||||||
use std::str::FromStr;
|
|
||||||
|
|
||||||
use anyhow::{Context, Result, anyhow};
|
|
||||||
use objdiff_core::diff::{ConfigEnum, ConfigPropertyId, ConfigPropertyKind, DiffObjConfig};
|
|
||||||
|
|
||||||
pub fn apply_config_args(diff_config: &mut DiffObjConfig, args: &[String]) -> Result<()> {
|
|
||||||
for config in args {
|
|
||||||
let (key, value) = config.split_once('=').context("--config expects \"key=value\"")?;
|
|
||||||
let property_id = ConfigPropertyId::from_str(key)
|
|
||||||
.map_err(|()| anyhow!("Invalid configuration property: {}", key))?;
|
|
||||||
diff_config.set_property_value_str(property_id, value).map_err(|()| {
|
|
||||||
let mut options = String::new();
|
|
||||||
match property_id.kind() {
|
|
||||||
ConfigPropertyKind::Boolean => {
|
|
||||||
options = "true, false".to_string();
|
|
||||||
}
|
|
||||||
ConfigPropertyKind::Choice(variants) => {
|
|
||||||
for (i, variant) in variants.iter().enumerate() {
|
|
||||||
if i > 0 {
|
|
||||||
options.push_str(", ");
|
|
||||||
}
|
|
||||||
options.push_str(variant.value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
anyhow!("Invalid value for {}. Expected one of: {}", property_id.name(), options)
|
|
||||||
})?;
|
|
||||||
}
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
@ -17,7 +17,7 @@ use tracing::{info, warn};
|
|||||||
use typed_path::{Utf8PlatformPath, Utf8PlatformPathBuf};
|
use typed_path::{Utf8PlatformPath, Utf8PlatformPathBuf};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
cmd::{apply_config_args, diff::ObjectConfig},
|
cmd::diff::ObjectConfig,
|
||||||
util::output::{OutputFormat, write_output},
|
util::output::{OutputFormat, write_output},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -52,9 +52,6 @@ pub struct GenerateArgs {
|
|||||||
#[argp(option, short = 'f')]
|
#[argp(option, short = 'f')]
|
||||||
/// Output format (json, json-pretty, proto) (default: json)
|
/// Output format (json, json-pretty, proto) (default: json)
|
||||||
format: Option<String>,
|
format: Option<String>,
|
||||||
#[argp(option, short = 'c')]
|
|
||||||
/// Configuration property (key=value)
|
|
||||||
config: Vec<String>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(FromArgs, PartialEq, Debug)]
|
#[derive(FromArgs, PartialEq, Debug)]
|
||||||
@ -83,15 +80,6 @@ pub fn run(args: Args) -> Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn generate(args: GenerateArgs) -> Result<()> {
|
fn generate(args: GenerateArgs) -> Result<()> {
|
||||||
let mut diff_config = diff::DiffObjConfig {
|
|
||||||
function_reloc_diffs: diff::FunctionRelocDiffs::None,
|
|
||||||
combine_data_sections: true,
|
|
||||||
combine_text_sections: true,
|
|
||||||
ppc_calculate_pool_relocations: false,
|
|
||||||
..Default::default()
|
|
||||||
};
|
|
||||||
apply_config_args(&mut diff_config, &args.config)?;
|
|
||||||
|
|
||||||
let output_format = OutputFormat::from_option(args.format.as_deref())?;
|
let output_format = OutputFormat::from_option(args.format.as_deref())?;
|
||||||
let project_dir = args.project.as_deref().unwrap_or_else(|| Utf8PlatformPath::new("."));
|
let project_dir = args.project.as_deref().unwrap_or_else(|| Utf8PlatformPath::new("."));
|
||||||
info!("Loading project {}", project_dir);
|
info!("Loading project {}", project_dir);
|
||||||
@ -126,15 +114,14 @@ fn generate(args: GenerateArgs) -> Result<()> {
|
|||||||
if args.deduplicate {
|
if args.deduplicate {
|
||||||
// If deduplicating, we need to run single-threaded
|
// If deduplicating, we need to run single-threaded
|
||||||
for object in &objects {
|
for object in &objects {
|
||||||
if let Some(unit) = report_object(object, &diff_config, Some(&mut existing_functions))?
|
if let Some(unit) = report_object(object, Some(&mut existing_functions))? {
|
||||||
{
|
|
||||||
units.push(unit);
|
units.push(unit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let vec = objects
|
let vec = objects
|
||||||
.par_iter()
|
.par_iter()
|
||||||
.map(|object| report_object(object, &diff_config, None))
|
.map(|object| report_object(object, None))
|
||||||
.collect::<Result<Vec<Option<ReportUnit>>>>()?;
|
.collect::<Result<Vec<Option<ReportUnit>>>>()?;
|
||||||
units = vec.into_iter().flatten().collect();
|
units = vec.into_iter().flatten().collect();
|
||||||
}
|
}
|
||||||
@ -158,7 +145,6 @@ fn generate(args: GenerateArgs) -> Result<()> {
|
|||||||
|
|
||||||
fn report_object(
|
fn report_object(
|
||||||
object: &ObjectConfig,
|
object: &ObjectConfig,
|
||||||
diff_config: &diff::DiffObjConfig,
|
|
||||||
mut existing_functions: Option<&mut HashSet<String>>,
|
mut existing_functions: Option<&mut HashSet<String>>,
|
||||||
) -> Result<Option<ReportUnit>> {
|
) -> Result<Option<ReportUnit>> {
|
||||||
match (&object.target_path, &object.base_path) {
|
match (&object.target_path, &object.base_path) {
|
||||||
@ -172,12 +158,16 @@ fn report_object(
|
|||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
let diff_config = diff::DiffObjConfig {
|
||||||
|
function_reloc_diffs: diff::FunctionRelocDiffs::None,
|
||||||
|
..Default::default()
|
||||||
|
};
|
||||||
let mapping_config = diff::MappingConfig::default();
|
let mapping_config = diff::MappingConfig::default();
|
||||||
let target = object
|
let target = object
|
||||||
.target_path
|
.target_path
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|p| {
|
.map(|p| {
|
||||||
obj::read::read(p.as_ref(), diff_config)
|
obj::read::read(p.as_ref(), &diff_config)
|
||||||
.with_context(|| format!("Failed to open {}", p))
|
.with_context(|| format!("Failed to open {}", p))
|
||||||
})
|
})
|
||||||
.transpose()?;
|
.transpose()?;
|
||||||
@ -185,12 +175,12 @@ fn report_object(
|
|||||||
.base_path
|
.base_path
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|p| {
|
.map(|p| {
|
||||||
obj::read::read(p.as_ref(), diff_config)
|
obj::read::read(p.as_ref(), &diff_config)
|
||||||
.with_context(|| format!("Failed to open {}", p))
|
.with_context(|| format!("Failed to open {}", p))
|
||||||
})
|
})
|
||||||
.transpose()?;
|
.transpose()?;
|
||||||
let result =
|
let result =
|
||||||
diff::diff_objs(target.as_ref(), base.as_ref(), None, diff_config, &mapping_config)?;
|
diff::diff_objs(target.as_ref(), base.as_ref(), None, &diff_config, &mapping_config)?;
|
||||||
|
|
||||||
let metadata = ReportUnitMetadata {
|
let metadata = ReportUnitMetadata {
|
||||||
complete: object.metadata.complete,
|
complete: object.metadata.complete,
|
||||||
@ -212,9 +202,6 @@ fn report_object(
|
|||||||
for ((section_idx, section), section_diff) in
|
for ((section_idx, section), section_diff) in
|
||||||
obj.sections.iter().enumerate().zip(&obj_diff.sections)
|
obj.sections.iter().enumerate().zip(&obj_diff.sections)
|
||||||
{
|
{
|
||||||
if section.kind == SectionKind::Unknown {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
let section_match_percent = section_diff.match_percent.unwrap_or_else(|| {
|
let section_match_percent = section_diff.match_percent.unwrap_or_else(|| {
|
||||||
// Support cases where we don't have a target object,
|
// Support cases where we don't have a target object,
|
||||||
// assume complete means 100% match
|
// assume complete means 100% match
|
||||||
@ -228,7 +215,6 @@ fn report_object(
|
|||||||
demangled_name: None,
|
demangled_name: None,
|
||||||
virtual_address: section.virtual_address,
|
virtual_address: section.virtual_address,
|
||||||
}),
|
}),
|
||||||
address: None,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
match section.kind {
|
match section.kind {
|
||||||
@ -276,7 +262,6 @@ fn report_object(
|
|||||||
demangled_name: symbol.demangled_name.clone(),
|
demangled_name: symbol.demangled_name.clone(),
|
||||||
virtual_address: symbol.virtual_address,
|
virtual_address: symbol.virtual_address,
|
||||||
}),
|
}),
|
||||||
address: symbol.address.checked_sub(section.address),
|
|
||||||
});
|
});
|
||||||
if match_percent == 100.0 {
|
if match_percent == 100.0 {
|
||||||
measures.matched_functions += 1;
|
measures.matched_functions += 1;
|
||||||
@ -284,16 +269,6 @@ fn report_object(
|
|||||||
measures.total_functions += 1;
|
measures.total_functions += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sections.sort_by(|a, b| a.name.cmp(&b.name));
|
|
||||||
let reverse_fn_order = object.metadata.reverse_fn_order.unwrap_or(false);
|
|
||||||
functions.sort_by(|a, b| {
|
|
||||||
if reverse_fn_order {
|
|
||||||
b.address.unwrap_or(0).cmp(&a.address.unwrap_or(0))
|
|
||||||
} else {
|
|
||||||
a.address.unwrap_or(u64::MAX).cmp(&b.address.unwrap_or(u64::MAX))
|
|
||||||
}
|
|
||||||
.then_with(|| a.size.cmp(&b.size))
|
|
||||||
});
|
|
||||||
if metadata.complete.unwrap_or(false) {
|
if metadata.complete.unwrap_or(false) {
|
||||||
measures.complete_code = measures.total_code;
|
measures.complete_code = measures.total_code;
|
||||||
measures.complete_data = measures.total_data;
|
measures.complete_data = measures.total_data;
|
||||||
|
@ -450,11 +450,11 @@ impl UiView for FunctionDiffUi {
|
|||||||
|
|
||||||
fn reload(&mut self, state: &AppState) -> Result<()> {
|
fn reload(&mut self, state: &AppState) -> Result<()> {
|
||||||
let left_sym =
|
let left_sym =
|
||||||
state.left_obj.as_ref().and_then(|(o, _)| o.symbol_by_name(&self.symbol_name));
|
state.left_obj.as_ref().and_then(|(o, _)| find_function(o, &self.symbol_name));
|
||||||
let right_sym =
|
let right_sym =
|
||||||
state.right_obj.as_ref().and_then(|(o, _)| o.symbol_by_name(&self.symbol_name));
|
state.right_obj.as_ref().and_then(|(o, _)| find_function(o, &self.symbol_name));
|
||||||
let prev_sym =
|
let prev_sym =
|
||||||
state.prev_obj.as_ref().and_then(|(o, _)| o.symbol_by_name(&self.symbol_name));
|
state.prev_obj.as_ref().and_then(|(o, _)| find_function(o, &self.symbol_name));
|
||||||
self.num_rows = match (
|
self.num_rows = match (
|
||||||
get_symbol(state.left_obj.as_ref(), left_sym),
|
get_symbol(state.left_obj.as_ref(), left_sym),
|
||||||
get_symbol(state.right_obj.as_ref(), right_sym),
|
get_symbol(state.right_obj.as_ref(), right_sym),
|
||||||
@ -650,3 +650,12 @@ fn get_symbol(
|
|||||||
let sym = sym?;
|
let sym = sym?;
|
||||||
Some((obj, sym, &diff.symbols[sym]))
|
Some((obj, sym, &diff.symbols[sym]))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn find_function(obj: &Object, name: &str) -> Option<usize> {
|
||||||
|
for (symbol_idx, symbol) in obj.symbols.iter().enumerate() {
|
||||||
|
if symbol.name == name {
|
||||||
|
return Some(symbol_idx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
None
|
||||||
|
}
|
||||||
|
@ -27,7 +27,6 @@ all = [
|
|||||||
"mips",
|
"mips",
|
||||||
"ppc",
|
"ppc",
|
||||||
"x86",
|
"x86",
|
||||||
"superh"
|
|
||||||
]
|
]
|
||||||
# Implicit, used to check if any arch is enabled
|
# Implicit, used to check if any arch is enabled
|
||||||
any-arch = [
|
any-arch = [
|
||||||
@ -41,7 +40,6 @@ any-arch = [
|
|||||||
"dep:regex",
|
"dep:regex",
|
||||||
"dep:similar",
|
"dep:similar",
|
||||||
"dep:syn",
|
"dep:syn",
|
||||||
"dep:encoding_rs"
|
|
||||||
]
|
]
|
||||||
bindings = [
|
bindings = [
|
||||||
"dep:prost",
|
"dep:prost",
|
||||||
@ -77,7 +75,6 @@ std = [
|
|||||||
"object/std",
|
"object/std",
|
||||||
"prost?/std",
|
"prost?/std",
|
||||||
"serde?/std",
|
"serde?/std",
|
||||||
"similar?/std",
|
|
||||||
"typed-path?/std",
|
"typed-path?/std",
|
||||||
"dep:filetime",
|
"dep:filetime",
|
||||||
"dep:memmap2",
|
"dep:memmap2",
|
||||||
@ -113,9 +110,6 @@ arm64 = [
|
|||||||
"dep:yaxpeax-arch",
|
"dep:yaxpeax-arch",
|
||||||
"dep:yaxpeax-arm",
|
"dep:yaxpeax-arm",
|
||||||
]
|
]
|
||||||
superh = [
|
|
||||||
"any-arch",
|
|
||||||
]
|
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
features = ["all"]
|
features = ["all"]
|
||||||
@ -128,13 +122,13 @@ itertools = { version = "0.14", default-features = false, features = ["use_alloc
|
|||||||
log = { version = "0.4", default-features = false, optional = true }
|
log = { version = "0.4", default-features = false, optional = true }
|
||||||
memmap2 = { version = "0.9", optional = true }
|
memmap2 = { version = "0.9", optional = true }
|
||||||
num-traits = { version = "0.2", default-features = false, optional = true }
|
num-traits = { version = "0.2", default-features = false, optional = true }
|
||||||
object = { git = "https://github.com/gimli-rs/object", rev = "a74579249e21ab8fcd3a86be588de336f18297cb", default-features = false, features = ["read_core", "elf", "pe"] }
|
object = { version = "0.36", default-features = false, features = ["read_core", "elf", "pe"] }
|
||||||
pbjson = { version = "0.7", default-features = false, optional = true }
|
pbjson = { version = "0.7", default-features = false, optional = true }
|
||||||
prost = { version = "0.13", default-features = false, features = ["prost-derive"], optional = true }
|
prost = { version = "0.13", default-features = false, features = ["prost-derive"], optional = true }
|
||||||
regex = { version = "1.11", default-features = false, features = [], optional = true }
|
regex = { version = "1.11", default-features = false, features = [], optional = true }
|
||||||
serde = { version = "1.0", default-features = false, features = ["derive"], optional = true }
|
serde = { version = "1.0", default-features = false, features = ["derive"], optional = true }
|
||||||
similar = { version = "2.7", default-features = false, features = ["hashbrown"], optional = true, git = "https://github.com/encounter/similar.git", branch = "no_std" }
|
similar = { version = "2.7", default-features = false, optional = true, git = "https://github.com/encounter/similar.git", branch = "no_std" }
|
||||||
typed-path = { version = "0.11", default-features = false, optional = true }
|
typed-path = { version = "0.10", default-features = false, optional = true }
|
||||||
|
|
||||||
# config
|
# config
|
||||||
globset = { version = "0.4", default-features = false, optional = true }
|
globset = { version = "0.4", default-features = false, optional = true }
|
||||||
@ -146,12 +140,12 @@ gimli = { version = "0.31", default-features = false, features = ["read"], optio
|
|||||||
|
|
||||||
# ppc
|
# ppc
|
||||||
cwdemangle = { version = "1.0", optional = true }
|
cwdemangle = { version = "1.0", optional = true }
|
||||||
cwextab = { version = "1.0", optional = true }
|
cwextab = { version = "1.0", optional = true, git = "https://github.com/CelestialAmber/cwextab.git" }
|
||||||
ppc750cl = { version = "0.3", optional = true }
|
ppc750cl = { version = "0.3", optional = true }
|
||||||
rlwinmdec = { version = "1.1", optional = true }
|
rlwinmdec = { version = "1.1", optional = true, git = "https://github.com/CelestialAmber/rlwinmdec.git" }
|
||||||
|
|
||||||
# mips
|
# mips
|
||||||
rabbitizer = { version = "2.0.0-alpha.1", default-features = false, features = ["all_extensions"], optional = true }
|
rabbitizer = { git = "https://github.com/Decompollaborate/rabbitizer.git", branch = "🦀", default-features = false, features = ["all_extensions"], optional = true }
|
||||||
|
|
||||||
# x86
|
# x86
|
||||||
cpp_demangle = { version = "0.4", default-features = false, features = ["alloc"], optional = true }
|
cpp_demangle = { version = "0.4", default-features = false, features = ["alloc"], optional = true }
|
||||||
@ -159,7 +153,7 @@ iced-x86 = { version = "1.21", default-features = false, features = ["decoder",
|
|||||||
msvc-demangler = { version = "0.11", optional = true }
|
msvc-demangler = { version = "0.11", optional = true }
|
||||||
|
|
||||||
# arm
|
# arm
|
||||||
unarm = { version = "1.8", optional = true }
|
unarm = { version = "1.7", optional = true }
|
||||||
arm-attr = { version = "0.2", optional = true }
|
arm-attr = { version = "0.2", optional = true }
|
||||||
|
|
||||||
# arm64
|
# arm64
|
||||||
@ -170,9 +164,8 @@ yaxpeax-arm = { version = "0.3", default-features = false, optional = true }
|
|||||||
notify = { version = "8.0.0", optional = true }
|
notify = { version = "8.0.0", optional = true }
|
||||||
notify-debouncer-full = { version = "0.5.0", optional = true }
|
notify-debouncer-full = { version = "0.5.0", optional = true }
|
||||||
shell-escape = { version = "0.1", optional = true }
|
shell-escape = { version = "0.1", optional = true }
|
||||||
tempfile = { version = "3.19", optional = true }
|
tempfile = { version = "3.17", optional = true }
|
||||||
time = { version = "0.3", optional = true }
|
time = { version = "0.3", optional = true }
|
||||||
encoding_rs = { version = "0.8.35", optional = true }
|
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
winapi = { version = "0.3", optional = true }
|
winapi = { version = "0.3", optional = true }
|
||||||
@ -201,4 +194,4 @@ syn = { version = "2.0", optional = true }
|
|||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
# Enable all features for tests
|
# Enable all features for tests
|
||||||
objdiff-core = { path = ".", features = ["all"] }
|
objdiff-core = { path = ".", features = ["all"] }
|
||||||
insta = "1.43"
|
insta = "1.42"
|
||||||
|
@ -5,12 +5,11 @@ objdiff-core contains the core functionality of [objdiff](https://github.com/enc
|
|||||||
## Crate feature flags
|
## Crate feature flags
|
||||||
|
|
||||||
- **`all`**: Enables all main features.
|
- **`all`**: Enables all main features.
|
||||||
- **`bindings`**: Enables serialization and deserialization of objdiff data structures.
|
|
||||||
- **`config`**: Enables objdiff configuration file support.
|
- **`config`**: Enables objdiff configuration file support.
|
||||||
- **`dwarf`**: Enables extraction of line number information from DWARF debug sections.
|
- **`dwarf`**: Enables extraction of line number information from DWARF debug sections.
|
||||||
- **`arm64`**: Enables the ARM64 backend powered by [yaxpeax-arm](https://github.com/iximeow/yaxpeax-arm).
|
- **`mips`**: Enables the MIPS backend powered by [rabbitizer](https://github.com/Decompollaborate/rabbitizer). (Note: C library with Rust bindings)
|
||||||
- **`arm`**: Enables the ARM backend powered by [unarm](https://github.com/AetiasHax/unarm).
|
|
||||||
- **`mips`**: Enables the MIPS backend powered by [rabbitizer](https://github.com/Decompollaborate/rabbitizer).
|
|
||||||
- **`ppc`**: Enables the PowerPC backend powered by [ppc750cl](https://github.com/encounter/ppc750cl).
|
- **`ppc`**: Enables the PowerPC backend powered by [ppc750cl](https://github.com/encounter/ppc750cl).
|
||||||
- **`superh`**: Enables the SuperH backend powered by an included disassembler.
|
|
||||||
- **`x86`**: Enables the x86 backend powered by [iced-x86](https://crates.io/crates/iced-x86).
|
- **`x86`**: Enables the x86 backend powered by [iced-x86](https://crates.io/crates/iced-x86).
|
||||||
|
- **`arm`**: Enables the ARM backend powered by [unarm](https://github.com/AetiasHax/unarm).
|
||||||
|
- **`arm64`**: Enables the ARM64 backend powered by [yaxpeax-arm](https://github.com/iximeow/yaxpeax-arm).
|
||||||
|
- **`bindings`**: Enables serialization and deserialization of objdiff data structures.
|
||||||
|
Binary file not shown.
@ -99,8 +99,6 @@ message ReportItem {
|
|||||||
float fuzzy_match_percent = 3;
|
float fuzzy_match_percent = 3;
|
||||||
// Extra metadata for this item
|
// Extra metadata for this item
|
||||||
optional ReportItemMetadata metadata = 4;
|
optional ReportItemMetadata metadata = 4;
|
||||||
// Address of the item (section-relative offset)
|
|
||||||
optional uint64 address = 5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extra metadata for an item
|
// Extra metadata for an item
|
||||||
|
@ -14,8 +14,8 @@ use crate::{
|
|||||||
arch::Arch,
|
arch::Arch,
|
||||||
diff::{ArmArchVersion, ArmR9Usage, DiffObjConfig, display::InstructionPart},
|
diff::{ArmArchVersion, ArmR9Usage, DiffObjConfig, display::InstructionPart},
|
||||||
obj::{
|
obj::{
|
||||||
InstructionRef, Relocation, RelocationFlags, ResolvedInstructionRef, ResolvedRelocation,
|
InstructionRef, RelocationFlags, ResolvedInstructionRef, ResolvedRelocation,
|
||||||
Section, SectionKind, Symbol, SymbolFlag, SymbolFlagSet, SymbolKind,
|
ScannedInstruction, SymbolFlag, SymbolFlagSet, SymbolKind,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -32,8 +32,7 @@ impl ArchArm {
|
|||||||
let endianness = file.endianness();
|
let endianness = file.endianness();
|
||||||
match file {
|
match file {
|
||||||
object::File::Elf32(_) => {
|
object::File::Elf32(_) => {
|
||||||
// The disasm_modes mapping is populated later in the post_init step so that we have access to merged sections.
|
let disasm_modes = Self::elf_get_mapping_symbols(file);
|
||||||
let disasm_modes = BTreeMap::new();
|
|
||||||
let detected_version = Self::elf_detect_arm_version(file)?;
|
let detected_version = Self::elf_detect_arm_version(file)?;
|
||||||
Ok(Self { disasm_modes, detected_version, endianness })
|
Ok(Self { disasm_modes, detected_version, endianness })
|
||||||
}
|
}
|
||||||
@ -74,22 +73,18 @@ impl ArchArm {
|
|||||||
Ok(None)
|
Ok(None)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_mapping_symbols(
|
fn elf_get_mapping_symbols(file: &object::File) -> BTreeMap<usize, Vec<DisasmMode>> {
|
||||||
sections: &[Section],
|
file.sections()
|
||||||
symbols: &[Symbol],
|
.filter(|s| s.kind() == object::SectionKind::Text)
|
||||||
) -> BTreeMap<usize, Vec<DisasmMode>> {
|
.map(|s| {
|
||||||
sections
|
let index = s.index();
|
||||||
.iter()
|
let mut mapping_symbols: Vec<_> = file
|
||||||
.enumerate()
|
.symbols()
|
||||||
.filter(|(_, section)| section.kind == SectionKind::Code)
|
.filter(|s| s.section_index().map(|i| i == index).unwrap_or(false))
|
||||||
.map(|(index, _)| {
|
.filter_map(|s| DisasmMode::from_symbol(&s))
|
||||||
let mut mapping_symbols: Vec<_> = symbols
|
|
||||||
.iter()
|
|
||||||
.filter(|s| s.section.map(|i| i == index).unwrap_or(false))
|
|
||||||
.filter_map(DisasmMode::from_symbol)
|
|
||||||
.collect();
|
.collect();
|
||||||
mapping_symbols.sort_unstable_by_key(|x| x.address);
|
mapping_symbols.sort_unstable_by_key(|x| x.address);
|
||||||
(index, mapping_symbols)
|
(s.index().0 - 1, mapping_symbols)
|
||||||
})
|
})
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
@ -183,18 +178,13 @@ impl ArchArm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Arch for ArchArm {
|
impl Arch for ArchArm {
|
||||||
fn post_init(&mut self, sections: &[Section], symbols: &[Symbol]) {
|
fn scan_instructions(
|
||||||
self.disasm_modes = Self::get_mapping_symbols(sections, symbols);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn scan_instructions_internal(
|
|
||||||
&self,
|
&self,
|
||||||
address: u64,
|
address: u64,
|
||||||
code: &[u8],
|
code: &[u8],
|
||||||
section_index: usize,
|
section_index: usize,
|
||||||
_relocations: &[Relocation],
|
|
||||||
diff_config: &DiffObjConfig,
|
diff_config: &DiffObjConfig,
|
||||||
) -> Result<Vec<InstructionRef>> {
|
) -> Result<Vec<ScannedInstruction>> {
|
||||||
let start_addr = address as u32;
|
let start_addr = address as u32;
|
||||||
let end_addr = start_addr + code.len() as u32;
|
let end_addr = start_addr + code.len() as u32;
|
||||||
|
|
||||||
@ -208,7 +198,7 @@ impl Arch for ArchArm {
|
|||||||
.unwrap_or(&fallback_mappings);
|
.unwrap_or(&fallback_mappings);
|
||||||
let first_mapping_idx = mapping_symbols
|
let first_mapping_idx = mapping_symbols
|
||||||
.binary_search_by_key(&start_addr, |x| x.address)
|
.binary_search_by_key(&start_addr, |x| x.address)
|
||||||
.unwrap_or_else(|idx| idx.saturating_sub(1));
|
.unwrap_or_else(|idx| idx - 1);
|
||||||
let mut mode = mapping_symbols[first_mapping_idx].mapping;
|
let mut mode = mapping_symbols[first_mapping_idx].mapping;
|
||||||
|
|
||||||
let mut mappings_iter = mapping_symbols
|
let mut mappings_iter = mapping_symbols
|
||||||
@ -219,13 +209,13 @@ impl Arch for ArchArm {
|
|||||||
let mut next_mapping = mappings_iter.next();
|
let mut next_mapping = mappings_iter.next();
|
||||||
|
|
||||||
let ins_count = code.len() / mode.instruction_size(start_addr);
|
let ins_count = code.len() / mode.instruction_size(start_addr);
|
||||||
let mut ops = Vec::<InstructionRef>::with_capacity(ins_count);
|
let mut ops = Vec::<ScannedInstruction>::with_capacity(ins_count);
|
||||||
|
|
||||||
let parse_flags = self.parse_flags(diff_config);
|
let parse_flags = self.parse_flags(diff_config);
|
||||||
|
|
||||||
let mut address = start_addr;
|
let mut address = start_addr;
|
||||||
while address < end_addr {
|
while address < end_addr {
|
||||||
while let Some(next) = next_mapping.filter(|x| address >= x.address) {
|
while let Some(next) = next_mapping.take_if(|x| address >= x.address) {
|
||||||
// Change mapping
|
// Change mapping
|
||||||
mode = next.mapping;
|
mode = next.mapping;
|
||||||
next_mapping = mappings_iter.next();
|
next_mapping = mappings_iter.next();
|
||||||
@ -235,10 +225,12 @@ impl Arch for ArchArm {
|
|||||||
let data = &code[(address - start_addr) as usize..];
|
let data = &code[(address - start_addr) as usize..];
|
||||||
if data.len() < ins_size {
|
if data.len() < ins_size {
|
||||||
// Push the remainder as data
|
// Push the remainder as data
|
||||||
ops.push(InstructionRef {
|
ops.push(ScannedInstruction {
|
||||||
|
ins_ref: InstructionRef {
|
||||||
address: address as u64,
|
address: address as u64,
|
||||||
size: data.len() as u8,
|
size: data.len() as u8,
|
||||||
opcode: u16::MAX,
|
opcode: u16::MAX,
|
||||||
|
},
|
||||||
branch_dest: None,
|
branch_dest: None,
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
@ -254,10 +246,12 @@ impl Arch for ArchArm {
|
|||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
// Invalid instruction size
|
// Invalid instruction size
|
||||||
ops.push(InstructionRef {
|
ops.push(ScannedInstruction {
|
||||||
|
ins_ref: InstructionRef {
|
||||||
address: address as u64,
|
address: address as u64,
|
||||||
size: ins_size as u8,
|
size: ins_size as u8,
|
||||||
opcode: u16::MAX,
|
opcode: u16::MAX,
|
||||||
|
},
|
||||||
branch_dest: None,
|
branch_dest: None,
|
||||||
});
|
});
|
||||||
address += ins_size as u32;
|
address += ins_size as u32;
|
||||||
@ -321,10 +315,8 @@ impl Arch for ArchArm {
|
|||||||
unarm::ParseMode::Data => (u16::MAX, None),
|
unarm::ParseMode::Data => (u16::MAX, None),
|
||||||
};
|
};
|
||||||
|
|
||||||
ops.push(InstructionRef {
|
ops.push(ScannedInstruction {
|
||||||
address: address as u64,
|
ins_ref: InstructionRef { address: address as u64, size: ins_size as u8, opcode },
|
||||||
size: ins_size as u8,
|
|
||||||
opcode,
|
|
||||||
branch_dest: branch_dest.map(|x| x as u64),
|
branch_dest: branch_dest.map(|x| x as u64),
|
||||||
});
|
});
|
||||||
address += ins_size as u32;
|
address += ins_size as u32;
|
||||||
@ -345,7 +337,6 @@ impl Arch for ArchArm {
|
|||||||
cb(InstructionPart::reloc())?;
|
cb(InstructionPart::reloc())?;
|
||||||
} else {
|
} else {
|
||||||
push_args(
|
push_args(
|
||||||
ins,
|
|
||||||
&parsed_ins,
|
&parsed_ins,
|
||||||
resolved.relocation,
|
resolved.relocation,
|
||||||
resolved.ins_ref.address as u32,
|
resolved.ins_ref.address as u32,
|
||||||
@ -449,7 +440,7 @@ impl Arch for ArchArm {
|
|||||||
|
|
||||||
fn extra_symbol_flags(&self, symbol: &object::Symbol) -> SymbolFlagSet {
|
fn extra_symbol_flags(&self, symbol: &object::Symbol) -> SymbolFlagSet {
|
||||||
let mut flags = SymbolFlagSet::default();
|
let mut flags = SymbolFlagSet::default();
|
||||||
if DisasmMode::from_object_symbol(symbol).is_some() {
|
if DisasmMode::from_symbol(symbol).is_some() {
|
||||||
flags |= SymbolFlag::Hidden;
|
flags |= SymbolFlag::Hidden;
|
||||||
}
|
}
|
||||||
flags
|
flags
|
||||||
@ -463,21 +454,15 @@ struct DisasmMode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl DisasmMode {
|
impl DisasmMode {
|
||||||
fn from_object_symbol<'a>(sym: &object::Symbol<'a, '_, &'a [u8]>) -> Option<Self> {
|
fn from_symbol<'a>(sym: &object::Symbol<'a, '_, &'a [u8]>) -> Option<Self> {
|
||||||
sym.name()
|
sym.name()
|
||||||
.ok()
|
.ok()
|
||||||
.and_then(unarm::ParseMode::from_mapping_symbol)
|
.and_then(unarm::ParseMode::from_mapping_symbol)
|
||||||
.map(|mapping| DisasmMode { address: sym.address() as u32, mapping })
|
.map(|mapping| DisasmMode { address: sym.address() as u32, mapping })
|
||||||
}
|
}
|
||||||
|
|
||||||
fn from_symbol(sym: &Symbol) -> Option<Self> {
|
|
||||||
unarm::ParseMode::from_mapping_symbol(&sym.name)
|
|
||||||
.map(|mapping| DisasmMode { address: sym.address as u32, mapping })
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn push_args(
|
fn push_args(
|
||||||
ins: unarm::Ins,
|
|
||||||
parsed_ins: &unarm::ParsedIns,
|
parsed_ins: &unarm::ParsedIns,
|
||||||
relocation: Option<ResolvedRelocation>,
|
relocation: Option<ResolvedRelocation>,
|
||||||
cur_addr: u32,
|
cur_addr: u32,
|
||||||
@ -623,14 +608,6 @@ fn push_args(
|
|||||||
arg_cb(InstructionPart::opaque("!"))?;
|
arg_cb(InstructionPart::opaque("!"))?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let branch_dest = get_pc_relative_load_address(ins, cur_addr);
|
|
||||||
if let Some(branch_dest) = branch_dest {
|
|
||||||
arg_cb(InstructionPart::basic(" (->"))?;
|
|
||||||
arg_cb(InstructionPart::branch_dest(branch_dest))?;
|
|
||||||
arg_cb(InstructionPart::basic(")"))?;
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -658,21 +635,3 @@ fn find_reloc_arg(
|
|||||||
None
|
None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_pc_relative_load_address(ins: unarm::Ins, address: u32) -> Option<u32> {
|
|
||||||
match ins {
|
|
||||||
unarm::Ins::Arm(ins)
|
|
||||||
if ins.op == arm::Opcode::Ldr
|
|
||||||
&& ins.modifier_addr_ldr_str() == arm::AddrLdrStr::Imm
|
|
||||||
&& ins.field_rn_deref().reg == args::Register::Pc =>
|
|
||||||
{
|
|
||||||
let offset = ins.field_offset_12().value;
|
|
||||||
Some(address.wrapping_add_signed(offset + 8))
|
|
||||||
}
|
|
||||||
unarm::Ins::Thumb(ins) if ins.op == thumb::Opcode::LdrPc => {
|
|
||||||
let offset = ins.field_rel_immed_8().value;
|
|
||||||
Some((address & !3).wrapping_add_signed(offset + 4))
|
|
||||||
}
|
|
||||||
_ => None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -17,7 +17,8 @@ use crate::{
|
|||||||
arch::Arch,
|
arch::Arch,
|
||||||
diff::{DiffObjConfig, display::InstructionPart},
|
diff::{DiffObjConfig, display::InstructionPart},
|
||||||
obj::{
|
obj::{
|
||||||
InstructionRef, Relocation, RelocationFlags, ResolvedInstructionRef, ResolvedRelocation,
|
InstructionRef, RelocationFlags, ResolvedInstructionRef, ResolvedRelocation,
|
||||||
|
ScannedInstruction,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -29,16 +30,15 @@ impl ArchArm64 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Arch for ArchArm64 {
|
impl Arch for ArchArm64 {
|
||||||
fn scan_instructions_internal(
|
fn scan_instructions(
|
||||||
&self,
|
&self,
|
||||||
address: u64,
|
address: u64,
|
||||||
code: &[u8],
|
code: &[u8],
|
||||||
_section_index: usize,
|
_section_index: usize,
|
||||||
_relocations: &[Relocation],
|
|
||||||
_diff_config: &DiffObjConfig,
|
_diff_config: &DiffObjConfig,
|
||||||
) -> Result<Vec<InstructionRef>> {
|
) -> Result<Vec<ScannedInstruction>> {
|
||||||
let start_address = address;
|
let start_address = address;
|
||||||
let mut ops = Vec::<InstructionRef>::with_capacity(code.len() / 4);
|
let mut ops = Vec::<ScannedInstruction>::with_capacity(code.len() / 4);
|
||||||
|
|
||||||
let mut reader = U8Reader::new(code);
|
let mut reader = U8Reader::new(code);
|
||||||
let decoder = InstDecoder::default();
|
let decoder = InstDecoder::default();
|
||||||
@ -57,10 +57,8 @@ impl Arch for ArchArm64 {
|
|||||||
DecodeError::InvalidOpcode
|
DecodeError::InvalidOpcode
|
||||||
| DecodeError::InvalidOperand
|
| DecodeError::InvalidOperand
|
||||||
| DecodeError::IncompleteDecoder => {
|
| DecodeError::IncompleteDecoder => {
|
||||||
ops.push(InstructionRef {
|
ops.push(ScannedInstruction {
|
||||||
address,
|
ins_ref: InstructionRef { address, size: 4, opcode: u16::MAX },
|
||||||
size: 4,
|
|
||||||
opcode: u16::MAX,
|
|
||||||
branch_dest: None,
|
branch_dest: None,
|
||||||
});
|
});
|
||||||
continue;
|
continue;
|
||||||
@ -69,9 +67,9 @@ impl Arch for ArchArm64 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let opcode = opcode_to_u16(ins.opcode);
|
let opcode = opcode_to_u16(ins.opcode);
|
||||||
let branch_dest =
|
let ins_ref = InstructionRef { address, size: 4, opcode };
|
||||||
branch_dest(opcode, address, &code[offset as usize..offset as usize + 4]);
|
let branch_dest = branch_dest(ins_ref, &code[offset as usize..offset as usize + 4]);
|
||||||
ops.push(InstructionRef { address, size: 4, opcode, branch_dest });
|
ops.push(ScannedInstruction { ins_ref, branch_dest });
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(ops)
|
Ok(ops)
|
||||||
@ -164,7 +162,7 @@ impl Arch for ArchArm64 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn branch_dest(opcode: u16, address: u64, code: &[u8]) -> Option<u64> {
|
fn branch_dest(ins_ref: InstructionRef, code: &[u8]) -> Option<u64> {
|
||||||
const OPCODE_B: u16 = opcode_to_u16(Opcode::B);
|
const OPCODE_B: u16 = opcode_to_u16(Opcode::B);
|
||||||
const OPCODE_BL: u16 = opcode_to_u16(Opcode::BL);
|
const OPCODE_BL: u16 = opcode_to_u16(Opcode::BL);
|
||||||
const OPCODE_BCC: u16 = opcode_to_u16(Opcode::Bcc(0));
|
const OPCODE_BCC: u16 = opcode_to_u16(Opcode::Bcc(0));
|
||||||
@ -174,21 +172,21 @@ fn branch_dest(opcode: u16, address: u64, code: &[u8]) -> Option<u64> {
|
|||||||
const OPCODE_TBNZ: u16 = opcode_to_u16(Opcode::TBNZ);
|
const OPCODE_TBNZ: u16 = opcode_to_u16(Opcode::TBNZ);
|
||||||
|
|
||||||
let word = u32::from_le_bytes(code.try_into().ok()?);
|
let word = u32::from_le_bytes(code.try_into().ok()?);
|
||||||
match opcode {
|
match ins_ref.opcode {
|
||||||
OPCODE_B | OPCODE_BL => {
|
OPCODE_B | OPCODE_BL => {
|
||||||
let offset = ((word & 0x03ff_ffff) << 2) as i32;
|
let offset = ((word & 0x03ff_ffff) << 2) as i32;
|
||||||
let extended_offset = (offset << 4) >> 4;
|
let extended_offset = (offset << 4) >> 4;
|
||||||
address.checked_add_signed(extended_offset as i64)
|
ins_ref.address.checked_add_signed(extended_offset as i64)
|
||||||
}
|
}
|
||||||
OPCODE_BCC | OPCODE_CBZ | OPCODE_CBNZ => {
|
OPCODE_BCC | OPCODE_CBZ | OPCODE_CBNZ => {
|
||||||
let offset = (word as i32 & 0x00ff_ffe0) >> 3;
|
let offset = (word as i32 & 0x00ff_ffe0) >> 3;
|
||||||
let extended_offset = (offset << 11) >> 11;
|
let extended_offset = (offset << 11) >> 11;
|
||||||
address.checked_add_signed(extended_offset as i64)
|
ins_ref.address.checked_add_signed(extended_offset as i64)
|
||||||
}
|
}
|
||||||
OPCODE_TBZ | OPCODE_TBNZ => {
|
OPCODE_TBZ | OPCODE_TBNZ => {
|
||||||
let offset = (word as i32 & 0x0007_ffe0) >> 3;
|
let offset = (word as i32 & 0x0007_ffe0) >> 3;
|
||||||
let extended_offset = (offset << 16) >> 16;
|
let extended_offset = (offset << 16) >> 16;
|
||||||
address.checked_add_signed(extended_offset as i64)
|
ins_ref.address.checked_add_signed(extended_offset as i64)
|
||||||
}
|
}
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ use alloc::{
|
|||||||
string::{String, ToString},
|
string::{String, ToString},
|
||||||
vec::Vec,
|
vec::Vec,
|
||||||
};
|
};
|
||||||
|
use core::ops::Range;
|
||||||
|
|
||||||
use anyhow::{Result, bail};
|
use anyhow::{Result, bail};
|
||||||
use object::{Endian as _, Object as _, ObjectSection as _, ObjectSymbol as _, elf};
|
use object::{Endian as _, Object as _, ObjectSection as _, ObjectSymbol as _, elf};
|
||||||
@ -18,7 +19,7 @@ use crate::{
|
|||||||
diff::{DiffObjConfig, MipsAbi, MipsInstrCategory, display::InstructionPart},
|
diff::{DiffObjConfig, MipsAbi, MipsInstrCategory, display::InstructionPart},
|
||||||
obj::{
|
obj::{
|
||||||
InstructionArg, InstructionArgValue, InstructionRef, Relocation, RelocationFlags,
|
InstructionArg, InstructionArgValue, InstructionRef, Relocation, RelocationFlags,
|
||||||
ResolvedInstructionRef, ResolvedRelocation, SymbolFlag, SymbolFlagSet,
|
ResolvedInstructionRef, ResolvedRelocation, ScannedInstruction, SymbolFlag, SymbolFlagSet,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -188,16 +189,15 @@ impl ArchMips {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Arch for ArchMips {
|
impl Arch for ArchMips {
|
||||||
fn scan_instructions_internal(
|
fn scan_instructions(
|
||||||
&self,
|
&self,
|
||||||
address: u64,
|
address: u64,
|
||||||
code: &[u8],
|
code: &[u8],
|
||||||
_section_index: usize,
|
_section_index: usize,
|
||||||
_relocations: &[Relocation],
|
|
||||||
diff_config: &DiffObjConfig,
|
diff_config: &DiffObjConfig,
|
||||||
) -> Result<Vec<InstructionRef>> {
|
) -> Result<Vec<ScannedInstruction>> {
|
||||||
let instruction_flags = self.instruction_flags(diff_config);
|
let instruction_flags = self.instruction_flags(diff_config);
|
||||||
let mut ops = Vec::<InstructionRef>::with_capacity(code.len() / 4);
|
let mut ops = Vec::<ScannedInstruction>::with_capacity(code.len() / 4);
|
||||||
let mut cur_addr = address as u32;
|
let mut cur_addr = address as u32;
|
||||||
for chunk in code.chunks_exact(4) {
|
for chunk in code.chunks_exact(4) {
|
||||||
let code = self.endianness.read_u32_bytes(chunk.try_into()?);
|
let code = self.endianness.read_u32_bytes(chunk.try_into()?);
|
||||||
@ -205,7 +205,10 @@ impl Arch for ArchMips {
|
|||||||
rabbitizer::Instruction::new(code, Vram::new(cur_addr), instruction_flags);
|
rabbitizer::Instruction::new(code, Vram::new(cur_addr), instruction_flags);
|
||||||
let opcode = instruction.opcode() as u16;
|
let opcode = instruction.opcode() as u16;
|
||||||
let branch_dest = instruction.get_branch_vram_generic().map(|v| v.inner() as u64);
|
let branch_dest = instruction.get_branch_vram_generic().map(|v| v.inner() as u64);
|
||||||
ops.push(InstructionRef { address: cur_addr as u64, size: 4, opcode, branch_dest });
|
ops.push(ScannedInstruction {
|
||||||
|
ins_ref: InstructionRef { address: cur_addr as u64, size: 4, opcode },
|
||||||
|
branch_dest,
|
||||||
|
});
|
||||||
cur_addr += 4;
|
cur_addr += 4;
|
||||||
}
|
}
|
||||||
Ok(ops)
|
Ok(ops)
|
||||||
@ -221,7 +224,16 @@ impl Arch for ArchMips {
|
|||||||
let display_flags = self.instruction_display_flags(diff_config);
|
let display_flags = self.instruction_display_flags(diff_config);
|
||||||
let opcode = instruction.opcode();
|
let opcode = instruction.opcode();
|
||||||
cb(InstructionPart::opcode(opcode.name(), opcode as u16))?;
|
cb(InstructionPart::opcode(opcode.name(), opcode as u16))?;
|
||||||
push_args(&instruction, resolved.relocation, &display_flags, cb)?;
|
let start_address = resolved.symbol.address;
|
||||||
|
let function_range = start_address..start_address + resolved.symbol.size;
|
||||||
|
push_args(
|
||||||
|
&instruction,
|
||||||
|
resolved.relocation,
|
||||||
|
function_range,
|
||||||
|
resolved.section_index,
|
||||||
|
&display_flags,
|
||||||
|
cb,
|
||||||
|
)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -325,6 +337,8 @@ impl Arch for ArchMips {
|
|||||||
fn push_args(
|
fn push_args(
|
||||||
instruction: &rabbitizer::Instruction,
|
instruction: &rabbitizer::Instruction,
|
||||||
relocation: Option<ResolvedRelocation>,
|
relocation: Option<ResolvedRelocation>,
|
||||||
|
function_range: Range<u64>,
|
||||||
|
section_index: usize,
|
||||||
display_flags: &rabbitizer::InstructionDisplayFlags,
|
display_flags: &rabbitizer::InstructionDisplayFlags,
|
||||||
mut arg_cb: impl FnMut(InstructionPart) -> Result<()>,
|
mut arg_cb: impl FnMut(InstructionPart) -> Result<()>,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
@ -347,7 +361,23 @@ fn push_args(
|
|||||||
}
|
}
|
||||||
ValuedOperand::core_label(..) | ValuedOperand::core_branch_target_label(..) => {
|
ValuedOperand::core_label(..) | ValuedOperand::core_branch_target_label(..) => {
|
||||||
if let Some(resolved) = relocation {
|
if let Some(resolved) = relocation {
|
||||||
|
// If the relocation target is within the current function, we can
|
||||||
|
// convert it into a relative branch target. Note that we check
|
||||||
|
// target_address > start_address instead of >= so that recursive
|
||||||
|
// tail calls are not considered branch targets.
|
||||||
|
let target_address =
|
||||||
|
resolved.symbol.address.checked_add_signed(resolved.relocation.addend);
|
||||||
|
if resolved.symbol.section == Some(section_index)
|
||||||
|
&& target_address.is_some_and(|addr| {
|
||||||
|
addr > function_range.start && addr < function_range.end
|
||||||
|
})
|
||||||
|
{
|
||||||
|
// TODO move this logic up a level
|
||||||
|
let target_address = target_address.unwrap();
|
||||||
|
arg_cb(InstructionPart::branch_dest(target_address))?;
|
||||||
|
} else {
|
||||||
push_reloc(resolved.relocation, &mut arg_cb)?;
|
push_reloc(resolved.relocation, &mut arg_cb)?;
|
||||||
|
}
|
||||||
} else if let Some(branch_dest) = instruction
|
} else if let Some(branch_dest) = instruction
|
||||||
.get_branch_offset_generic()
|
.get_branch_offset_generic()
|
||||||
.map(|o| (instruction.vram() + o).inner() as u64)
|
.map(|o| (instruction.vram() + o).inner() as u64)
|
||||||
|
@ -2,7 +2,6 @@ use alloc::{borrow::Cow, boxed::Box, format, string::String, vec::Vec};
|
|||||||
use core::{ffi::CStr, fmt, fmt::Debug};
|
use core::{ffi::CStr, fmt, fmt::Debug};
|
||||||
|
|
||||||
use anyhow::{Result, bail};
|
use anyhow::{Result, bail};
|
||||||
use encoding_rs::SHIFT_JIS;
|
|
||||||
use object::Endian as _;
|
use object::Endian as _;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
@ -11,8 +10,8 @@ use crate::{
|
|||||||
display::{ContextItem, HoverItem, InstructionPart},
|
display::{ContextItem, HoverItem, InstructionPart},
|
||||||
},
|
},
|
||||||
obj::{
|
obj::{
|
||||||
InstructionArg, InstructionRef, Object, ParsedInstruction, Relocation, RelocationFlags,
|
InstructionArg, Object, ParsedInstruction, Relocation, RelocationFlags,
|
||||||
ResolvedInstructionRef, ResolvedSymbol, Section, Symbol, SymbolFlagSet, SymbolKind,
|
ResolvedInstructionRef, ScannedInstruction, Symbol, SymbolFlagSet, SymbolKind,
|
||||||
},
|
},
|
||||||
util::ReallySigned,
|
util::ReallySigned,
|
||||||
};
|
};
|
||||||
@ -25,8 +24,6 @@ pub mod arm64;
|
|||||||
pub mod mips;
|
pub mod mips;
|
||||||
#[cfg(feature = "ppc")]
|
#[cfg(feature = "ppc")]
|
||||||
pub mod ppc;
|
pub mod ppc;
|
||||||
#[cfg(feature = "superh")]
|
|
||||||
pub mod superh;
|
|
||||||
#[cfg(feature = "x86")]
|
#[cfg(feature = "x86")]
|
||||||
pub mod x86;
|
pub mod x86;
|
||||||
|
|
||||||
@ -60,18 +57,13 @@ impl fmt::Display for DataType {
|
|||||||
impl DataType {
|
impl DataType {
|
||||||
pub fn display_labels(&self, endian: object::Endianness, bytes: &[u8]) -> Vec<String> {
|
pub fn display_labels(&self, endian: object::Endianness, bytes: &[u8]) -> Vec<String> {
|
||||||
let mut strs = Vec::new();
|
let mut strs = Vec::new();
|
||||||
for (literal, label_override) in self.display_literals(endian, bytes) {
|
for literal in self.display_literals(endian, bytes) {
|
||||||
let label = label_override.unwrap_or_else(|| format!("{}", self));
|
strs.push(format!("{}: {}", self, literal))
|
||||||
strs.push(format!("{}: {}", label, literal))
|
|
||||||
}
|
}
|
||||||
strs
|
strs
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn display_literals(
|
pub fn display_literals(&self, endian: object::Endianness, bytes: &[u8]) -> Vec<String> {
|
||||||
&self,
|
|
||||||
endian: object::Endianness,
|
|
||||||
bytes: &[u8],
|
|
||||||
) -> Vec<(String, Option<String>)> {
|
|
||||||
let mut strs = Vec::new();
|
let mut strs = Vec::new();
|
||||||
if self.required_len().is_some_and(|l| bytes.len() < l) {
|
if self.required_len().is_some_and(|l| bytes.len() < l) {
|
||||||
log::warn!(
|
log::warn!(
|
||||||
@ -95,72 +87,56 @@ impl DataType {
|
|||||||
match self {
|
match self {
|
||||||
DataType::Int8 => {
|
DataType::Int8 => {
|
||||||
let i = i8::from_ne_bytes(bytes.try_into().unwrap());
|
let i = i8::from_ne_bytes(bytes.try_into().unwrap());
|
||||||
strs.push((format!("{:#x}", i), None));
|
strs.push(format!("{:#x}", i));
|
||||||
|
|
||||||
if i < 0 {
|
if i < 0 {
|
||||||
strs.push((format!("{:#x}", ReallySigned(i)), None));
|
strs.push(format!("{:#x}", ReallySigned(i)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DataType::Int16 => {
|
DataType::Int16 => {
|
||||||
let i = endian.read_i16_bytes(bytes.try_into().unwrap());
|
let i = endian.read_i16_bytes(bytes.try_into().unwrap());
|
||||||
strs.push((format!("{:#x}", i), None));
|
strs.push(format!("{:#x}", i));
|
||||||
|
|
||||||
if i < 0 {
|
if i < 0 {
|
||||||
strs.push((format!("{:#x}", ReallySigned(i)), None));
|
strs.push(format!("{:#x}", ReallySigned(i)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DataType::Int32 => {
|
DataType::Int32 => {
|
||||||
let i = endian.read_i32_bytes(bytes.try_into().unwrap());
|
let i = endian.read_i32_bytes(bytes.try_into().unwrap());
|
||||||
strs.push((format!("{:#x}", i), None));
|
strs.push(format!("{:#x}", i));
|
||||||
|
|
||||||
if i < 0 {
|
if i < 0 {
|
||||||
strs.push((format!("{:#x}", ReallySigned(i)), None));
|
strs.push(format!("{:#x}", ReallySigned(i)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DataType::Int64 => {
|
DataType::Int64 => {
|
||||||
let i = endian.read_i64_bytes(bytes.try_into().unwrap());
|
let i = endian.read_i64_bytes(bytes.try_into().unwrap());
|
||||||
strs.push((format!("{:#x}", i), None));
|
strs.push(format!("{:#x}", i));
|
||||||
|
|
||||||
if i < 0 {
|
if i < 0 {
|
||||||
strs.push((format!("{:#x}", ReallySigned(i)), None));
|
strs.push(format!("{:#x}", ReallySigned(i)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DataType::Float => {
|
DataType::Float => {
|
||||||
let bytes: [u8; 4] = bytes.try_into().unwrap();
|
let bytes: [u8; 4] = bytes.try_into().unwrap();
|
||||||
strs.push((
|
strs.push(format!("{:?}f", match endian {
|
||||||
format!("{:?}f", match endian {
|
|
||||||
object::Endianness::Little => f32::from_le_bytes(bytes),
|
object::Endianness::Little => f32::from_le_bytes(bytes),
|
||||||
object::Endianness::Big => f32::from_be_bytes(bytes),
|
object::Endianness::Big => f32::from_be_bytes(bytes),
|
||||||
}),
|
}));
|
||||||
None,
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
DataType::Double => {
|
DataType::Double => {
|
||||||
let bytes: [u8; 8] = bytes.try_into().unwrap();
|
let bytes: [u8; 8] = bytes.try_into().unwrap();
|
||||||
strs.push((
|
strs.push(format!("{:?}", match endian {
|
||||||
format!("{:?}", match endian {
|
|
||||||
object::Endianness::Little => f64::from_le_bytes(bytes),
|
object::Endianness::Little => f64::from_le_bytes(bytes),
|
||||||
object::Endianness::Big => f64::from_be_bytes(bytes),
|
object::Endianness::Big => f64::from_be_bytes(bytes),
|
||||||
}),
|
}));
|
||||||
None,
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
DataType::Bytes => {
|
DataType::Bytes => {
|
||||||
strs.push((format!("{:#?}", bytes), None));
|
strs.push(format!("{:#?}", bytes));
|
||||||
}
|
}
|
||||||
DataType::String => {
|
DataType::String => {
|
||||||
if let Ok(cstr) = CStr::from_bytes_until_nul(bytes) {
|
if let Ok(cstr) = CStr::from_bytes_until_nul(bytes) {
|
||||||
strs.push((format!("{:?}", cstr), None));
|
strs.push(format!("{:?}", cstr));
|
||||||
}
|
|
||||||
if let Some(nul_idx) = bytes.iter().position(|&c| c == b'\0') {
|
|
||||||
let (cow, _, had_errors) = SHIFT_JIS.decode(&bytes[..nul_idx]);
|
|
||||||
if !had_errors {
|
|
||||||
let str = format!("{:?}", cow);
|
|
||||||
// Only add the Shift JIS string if it's different from the ASCII string.
|
|
||||||
if !strs.iter().any(|x| x.0 == str) {
|
|
||||||
strs.push((str, Some("Shift JIS".into())));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -182,108 +158,42 @@ impl DataType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl dyn Arch {
|
pub trait Arch: Send + Sync + Debug {
|
||||||
/// Generate a list of instructions references (offset, size, opcode) from the given code.
|
/// Generate a list of instructions references (offset, size, opcode) from the given code.
|
||||||
///
|
///
|
||||||
/// See [`scan_instructions_internal`] for more details.
|
/// The opcode IDs are used to generate the initial diff. Implementations should do as little
|
||||||
pub fn scan_instructions(
|
/// parsing as possible here: just enough to identify the base instruction opcode, size, and
|
||||||
|
/// possible branch destination (for visual representation). As needed, instructions are parsed
|
||||||
|
/// via `process_instruction` to compare their arguments.
|
||||||
|
fn scan_instructions(
|
||||||
&self,
|
&self,
|
||||||
resolved: ResolvedSymbol,
|
address: u64,
|
||||||
|
code: &[u8],
|
||||||
|
section_index: usize,
|
||||||
diff_config: &DiffObjConfig,
|
diff_config: &DiffObjConfig,
|
||||||
) -> Result<Vec<InstructionRef>> {
|
) -> Result<Vec<ScannedInstruction>>;
|
||||||
let mut result = self.scan_instructions_internal(
|
|
||||||
resolved.symbol.address,
|
|
||||||
resolved.data,
|
|
||||||
resolved.section_index,
|
|
||||||
&resolved.section.relocations,
|
|
||||||
diff_config,
|
|
||||||
)?;
|
|
||||||
|
|
||||||
let function_start = resolved.symbol.address;
|
|
||||||
let function_end = function_start + resolved.symbol.size;
|
|
||||||
|
|
||||||
// Remove any branch destinations that are outside the function range
|
|
||||||
for ins in result.iter_mut() {
|
|
||||||
if let Some(branch_dest) = ins.branch_dest {
|
|
||||||
if branch_dest < function_start || branch_dest >= function_end {
|
|
||||||
ins.branch_dest = None;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Resolve relocation targets within the same function to branch destinations
|
|
||||||
let mut ins_iter = result.iter_mut().peekable();
|
|
||||||
'outer: for reloc in resolved
|
|
||||||
.section
|
|
||||||
.relocations
|
|
||||||
.iter()
|
|
||||||
.skip_while(|r| r.address < function_start)
|
|
||||||
.take_while(|r| r.address < function_end)
|
|
||||||
{
|
|
||||||
let ins = loop {
|
|
||||||
let Some(ins) = ins_iter.peek_mut() else {
|
|
||||||
break 'outer;
|
|
||||||
};
|
|
||||||
if reloc.address < ins.address {
|
|
||||||
continue 'outer;
|
|
||||||
}
|
|
||||||
let ins = ins_iter.next().unwrap();
|
|
||||||
if reloc.address >= ins.address && reloc.address < ins.address + ins.size as u64 {
|
|
||||||
break ins;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
// Clear existing branch destination for instructions with relocations
|
|
||||||
ins.branch_dest = None;
|
|
||||||
let Some(target) = resolved.obj.symbols.get(reloc.target_symbol) else {
|
|
||||||
continue;
|
|
||||||
};
|
|
||||||
if target.section != Some(resolved.section_index) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
let Some(target_address) = target.address.checked_add_signed(reloc.addend) else {
|
|
||||||
continue;
|
|
||||||
};
|
|
||||||
// If the target address is within the function range, set it as a branch destination
|
|
||||||
if target_address >= function_start && target_address < function_end {
|
|
||||||
ins.branch_dest = Some(target_address);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(result)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Parse an instruction to gather its mnemonic and arguments for more detailed comparison.
|
/// Parse an instruction to gather its mnemonic and arguments for more detailed comparison.
|
||||||
///
|
///
|
||||||
/// This is called only when we need to compare the arguments of an instruction.
|
/// This is called only when we need to compare the arguments of an instruction.
|
||||||
pub fn process_instruction(
|
fn process_instruction(
|
||||||
&self,
|
&self,
|
||||||
resolved: ResolvedInstructionRef,
|
resolved: ResolvedInstructionRef,
|
||||||
diff_config: &DiffObjConfig,
|
diff_config: &DiffObjConfig,
|
||||||
) -> Result<ParsedInstruction> {
|
) -> Result<ParsedInstruction> {
|
||||||
let mut mnemonic = None;
|
let mut mnemonic = None;
|
||||||
let mut args = Vec::with_capacity(8);
|
let mut args = Vec::with_capacity(8);
|
||||||
let mut relocation_emitted = false;
|
|
||||||
self.display_instruction(resolved, diff_config, &mut |part| {
|
self.display_instruction(resolved, diff_config, &mut |part| {
|
||||||
match part {
|
match part {
|
||||||
InstructionPart::Opcode(m, _) => mnemonic = Some(Cow::Owned(m.into_owned())),
|
InstructionPart::Opcode(m, _) => mnemonic = Some(Cow::Owned(m.into_owned())),
|
||||||
InstructionPart::Arg(arg) => {
|
InstructionPart::Arg(arg) => args.push(arg.into_static()),
|
||||||
if arg == InstructionArg::Reloc {
|
|
||||||
relocation_emitted = true;
|
|
||||||
// If the relocation was resolved to a branch destination, emit that instead.
|
|
||||||
if let Some(dest) = resolved.ins_ref.branch_dest {
|
|
||||||
args.push(InstructionArg::BranchDest(dest));
|
|
||||||
return Ok(());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
args.push(arg.into_static());
|
|
||||||
}
|
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
})?;
|
})?;
|
||||||
// If the instruction has a relocation, but we didn't format it in the display, add it to
|
// If the instruction has a relocation, but we didn't format it in the display, add it to
|
||||||
// the end of the arguments list.
|
// the end of the arguments list.
|
||||||
if resolved.relocation.is_some() && !relocation_emitted {
|
if resolved.relocation.is_some() && !args.contains(&InstructionArg::Reloc) {
|
||||||
args.push(InstructionArg::Reloc);
|
args.push(InstructionArg::Reloc);
|
||||||
}
|
}
|
||||||
Ok(ParsedInstruction {
|
Ok(ParsedInstruction {
|
||||||
@ -292,26 +202,6 @@ impl dyn Arch {
|
|||||||
args,
|
args,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
pub trait Arch: Send + Sync + Debug {
|
|
||||||
/// Finishes arch-specific initialization that must be done after sections have been combined.
|
|
||||||
fn post_init(&mut self, _sections: &[Section], _symbols: &[Symbol]) {}
|
|
||||||
|
|
||||||
/// Generate a list of instructions references (offset, size, opcode) from the given code.
|
|
||||||
///
|
|
||||||
/// The opcode IDs are used to generate the initial diff. Implementations should do as little
|
|
||||||
/// parsing as possible here: just enough to identify the base instruction opcode, size, and
|
|
||||||
/// possible branch destination (for visual representation). As needed, instructions are parsed
|
|
||||||
/// via `process_instruction` to compare their arguments.
|
|
||||||
fn scan_instructions_internal(
|
|
||||||
&self,
|
|
||||||
address: u64,
|
|
||||||
code: &[u8],
|
|
||||||
section_index: usize,
|
|
||||||
relocations: &[Relocation],
|
|
||||||
diff_config: &DiffObjConfig,
|
|
||||||
) -> Result<Vec<InstructionRef>>;
|
|
||||||
|
|
||||||
/// Format an instruction for display.
|
/// Format an instruction for display.
|
||||||
///
|
///
|
||||||
@ -356,13 +246,7 @@ pub trait Arch: Send + Sync + Debug {
|
|||||||
SymbolFlagSet::default()
|
SymbolFlagSet::default()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn guess_data_type(
|
fn guess_data_type(&self, _resolved: ResolvedInstructionRef) -> Option<DataType> { None }
|
||||||
&self,
|
|
||||||
_resolved: ResolvedInstructionRef,
|
|
||||||
_bytes: &[u8],
|
|
||||||
) -> Option<DataType> {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
|
|
||||||
fn symbol_hover(&self, _obj: &Object, _symbol_index: usize) -> Vec<HoverItem> { Vec::new() }
|
fn symbol_hover(&self, _obj: &Object, _symbol_index: usize) -> Vec<HoverItem> { Vec::new() }
|
||||||
|
|
||||||
@ -400,8 +284,6 @@ pub fn new_arch(object: &object::File) -> Result<Box<dyn Arch>> {
|
|||||||
object::Architecture::Arm => Box::new(arm::ArchArm::new(object)?),
|
object::Architecture::Arm => Box::new(arm::ArchArm::new(object)?),
|
||||||
#[cfg(feature = "arm64")]
|
#[cfg(feature = "arm64")]
|
||||||
object::Architecture::Aarch64 => Box::new(arm64::ArchArm64::new(object)?),
|
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:?}"),
|
arch => bail!("Unsupported architecture: {arch:?}"),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -414,14 +296,13 @@ impl ArchDummy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Arch for ArchDummy {
|
impl Arch for ArchDummy {
|
||||||
fn scan_instructions_internal(
|
fn scan_instructions(
|
||||||
&self,
|
&self,
|
||||||
_address: u64,
|
_address: u64,
|
||||||
_code: &[u8],
|
_code: &[u8],
|
||||||
_section_index: usize,
|
_section_index: usize,
|
||||||
_relocations: &[Relocation],
|
|
||||||
_diff_config: &DiffObjConfig,
|
_diff_config: &DiffObjConfig,
|
||||||
) -> Result<Vec<InstructionRef>> {
|
) -> Result<Vec<ScannedInstruction>> {
|
||||||
Ok(Vec::new())
|
Ok(Vec::new())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ use crate::{
|
|||||||
},
|
},
|
||||||
obj::{
|
obj::{
|
||||||
InstructionRef, Object, Relocation, RelocationFlags, ResolvedInstructionRef,
|
InstructionRef, Object, Relocation, RelocationFlags, ResolvedInstructionRef,
|
||||||
ResolvedRelocation, Symbol, SymbolFlag, SymbolFlagSet,
|
ResolvedRelocation, ScannedInstruction, Symbol, SymbolFlag, SymbolFlagSet,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -82,22 +82,23 @@ impl ArchPpc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Arch for ArchPpc {
|
impl Arch for ArchPpc {
|
||||||
fn scan_instructions_internal(
|
fn scan_instructions(
|
||||||
&self,
|
&self,
|
||||||
address: u64,
|
address: u64,
|
||||||
code: &[u8],
|
code: &[u8],
|
||||||
_section_index: usize,
|
_section_index: usize,
|
||||||
_relocations: &[Relocation],
|
|
||||||
_diff_config: &DiffObjConfig,
|
_diff_config: &DiffObjConfig,
|
||||||
) -> Result<Vec<InstructionRef>> {
|
) -> Result<Vec<ScannedInstruction>> {
|
||||||
ensure!(code.len() & 3 == 0, "Code length must be a multiple of 4");
|
ensure!(code.len() & 3 == 0, "Code length must be a multiple of 4");
|
||||||
let ins_count = code.len() / 4;
|
let ins_count = code.len() / 4;
|
||||||
let mut insts = Vec::<InstructionRef>::with_capacity(ins_count);
|
let mut insts = Vec::<ScannedInstruction>::with_capacity(ins_count);
|
||||||
for (cur_addr, ins) in ppc750cl::InsIter::new(code, address as u32) {
|
for (cur_addr, ins) in ppc750cl::InsIter::new(code, address as u32) {
|
||||||
insts.push(InstructionRef {
|
insts.push(ScannedInstruction {
|
||||||
|
ins_ref: InstructionRef {
|
||||||
address: cur_addr as u64,
|
address: cur_addr as u64,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: u8::from(ins.op) as u16,
|
opcode: u8::from(ins.op) as u16,
|
||||||
|
},
|
||||||
branch_dest: ins.branch_dest(cur_addr).map(u64::from),
|
branch_dest: ins.branch_dest(cur_addr).map(u64::from),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -219,21 +220,12 @@ impl Arch for ArchPpc {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn guess_data_type(&self, resolved: ResolvedInstructionRef, bytes: &[u8]) -> Option<DataType> {
|
fn guess_data_type(&self, resolved: ResolvedInstructionRef) -> Option<DataType> {
|
||||||
if resolved.relocation.is_some_and(|r| r.symbol.name.starts_with("@stringBase")) {
|
if resolved.relocation.is_some_and(|r| r.symbol.name.starts_with("@stringBase")) {
|
||||||
// Pooled string.
|
|
||||||
return Some(DataType::String);
|
return Some(DataType::String);
|
||||||
}
|
}
|
||||||
let opcode = ppc750cl::Opcode::from(resolved.ins_ref.opcode as u8);
|
let opcode = ppc750cl::Opcode::from(resolved.ins_ref.opcode as u8);
|
||||||
if let Some(ty) = guess_data_type_from_load_store_inst_op(opcode) {
|
guess_data_type_from_load_store_inst_op(opcode)
|
||||||
// Numeric type.
|
|
||||||
return Some(ty);
|
|
||||||
}
|
|
||||||
if bytes.len() >= 2 && bytes.iter().position(|&c| c == b'\0') == Some(bytes.len() - 1) {
|
|
||||||
// It may be an unpooled string if the symbol contains exactly one null byte at the end of the symbol.
|
|
||||||
return Some(DataType::String);
|
|
||||||
}
|
|
||||||
None
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn symbol_hover(&self, _obj: &Object, symbol_index: usize) -> Vec<HoverItem> {
|
fn symbol_hover(&self, _obj: &Object, symbol_index: usize) -> Vec<HoverItem> {
|
||||||
@ -456,7 +448,7 @@ fn decode_exception_info(
|
|||||||
log::warn!(
|
log::warn!(
|
||||||
"Exception table decoding failed for function {}, reason: {}",
|
"Exception table decoding failed for function {}, reason: {}",
|
||||||
extab_func_name,
|
extab_func_name,
|
||||||
e
|
e.to_string()
|
||||||
);
|
);
|
||||||
return Ok(None);
|
return Ok(None);
|
||||||
}
|
}
|
||||||
@ -520,7 +512,6 @@ fn guess_data_type_from_load_store_inst_op(inst_op: ppc750cl::Opcode) -> Option<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
|
||||||
struct PoolReference {
|
struct PoolReference {
|
||||||
addr_src_gpr: ppc750cl::GPR,
|
addr_src_gpr: ppc750cl::GPR,
|
||||||
addr_offset: i16,
|
addr_offset: i16,
|
||||||
@ -653,7 +644,7 @@ fn make_fake_pool_reloc(
|
|||||||
// example, dCcD_Cyl in The Wind Waker). So just showing that vtable symbol plus an addend
|
// example, dCcD_Cyl in The Wind Waker). So just showing that vtable symbol plus an addend
|
||||||
// to represent the offset into it works fine in this case.
|
// to represent the offset into it works fine in this case.
|
||||||
target_symbol = pool_reloc.relocation.target_symbol;
|
target_symbol = pool_reloc.relocation.target_symbol;
|
||||||
addend = offset_from_pool;
|
addend = pool_reloc.relocation.addend + offset_from_pool;
|
||||||
}
|
}
|
||||||
Some(Relocation {
|
Some(Relocation {
|
||||||
flags: RelocationFlags::Elf(elf::R_PPC_NONE),
|
flags: RelocationFlags::Elf(elf::R_PPC_NONE),
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,821 +0,0 @@
|
|||||||
use alloc::{collections::BTreeMap, format, string::String, vec, vec::Vec};
|
|
||||||
|
|
||||||
use anyhow::{Result, bail};
|
|
||||||
use object::elf;
|
|
||||||
|
|
||||||
use crate::{
|
|
||||||
arch::{Arch, superh::disasm::sh2_disasm},
|
|
||||||
diff::{DiffObjConfig, display::InstructionPart},
|
|
||||||
obj::{InstructionRef, Relocation, RelocationFlags, ResolvedInstructionRef},
|
|
||||||
};
|
|
||||||
|
|
||||||
pub mod disasm;
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
|
||||||
pub struct ArchSuperH {}
|
|
||||||
|
|
||||||
impl ArchSuperH {
|
|
||||||
pub fn new(_file: &object::File) -> Result<Self> { Ok(Self {}) }
|
|
||||||
}
|
|
||||||
|
|
||||||
struct DataInfo {
|
|
||||||
address: u64,
|
|
||||||
size: u32,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Arch for ArchSuperH {
|
|
||||||
fn scan_instructions_internal(
|
|
||||||
&self,
|
|
||||||
address: u64,
|
|
||||||
code: &[u8],
|
|
||||||
_section_index: usize,
|
|
||||||
_relocations: &[Relocation],
|
|
||||||
_diff_config: &DiffObjConfig,
|
|
||||||
) -> Result<Vec<InstructionRef>> {
|
|
||||||
let mut ops = Vec::<InstructionRef>::with_capacity(code.len() / 2);
|
|
||||||
let mut offset = address;
|
|
||||||
|
|
||||||
for chunk in code.chunks_exact(2) {
|
|
||||||
let opcode = u16::from_be_bytes(chunk.try_into().unwrap());
|
|
||||||
let mut parts: Vec<InstructionPart> = vec![];
|
|
||||||
let resolved: ResolvedInstructionRef = Default::default();
|
|
||||||
let mut branch_dest: Option<u64> = None;
|
|
||||||
sh2_disasm(
|
|
||||||
offset.try_into().unwrap(),
|
|
||||||
opcode,
|
|
||||||
true,
|
|
||||||
&mut parts,
|
|
||||||
&resolved,
|
|
||||||
&mut branch_dest,
|
|
||||||
);
|
|
||||||
|
|
||||||
let opcode_enum: u16 = match parts.first() {
|
|
||||||
Some(InstructionPart::Opcode(_, val)) => *val,
|
|
||||||
_ => 0,
|
|
||||||
};
|
|
||||||
ops.push(InstructionRef { address: offset, size: 2, opcode: opcode_enum, branch_dest });
|
|
||||||
offset += 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(ops)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn display_instruction(
|
|
||||||
&self,
|
|
||||||
resolved: ResolvedInstructionRef,
|
|
||||||
_diff_config: &DiffObjConfig,
|
|
||||||
cb: &mut dyn FnMut(InstructionPart) -> Result<()>,
|
|
||||||
) -> Result<()> {
|
|
||||||
let opcode = u16::from_be_bytes(resolved.code.try_into().unwrap());
|
|
||||||
let mut parts: Vec<InstructionPart> = vec![];
|
|
||||||
let mut branch_dest: Option<u64> = None;
|
|
||||||
|
|
||||||
sh2_disasm(0, opcode, true, &mut parts, &resolved, &mut branch_dest);
|
|
||||||
|
|
||||||
if let Some(symbol_data) =
|
|
||||||
resolved.section.data_range(resolved.symbol.address, resolved.symbol.size as usize)
|
|
||||||
{
|
|
||||||
// scan for data
|
|
||||||
// map of instruction offsets to data target offsets
|
|
||||||
let mut data_offsets = BTreeMap::<u64, DataInfo>::new();
|
|
||||||
|
|
||||||
let mut pos: u64 = 0;
|
|
||||||
for chunk in symbol_data.chunks_exact(2) {
|
|
||||||
let opcode = u16::from_be_bytes(chunk.try_into().unwrap());
|
|
||||||
// mov.w
|
|
||||||
if (opcode & 0xf000) == 0x9000 {
|
|
||||||
let target = (opcode as u64 & 0xff) * 2 + 4 + pos;
|
|
||||||
let data_info = DataInfo { address: target, size: 2 };
|
|
||||||
data_offsets.insert(pos, data_info);
|
|
||||||
}
|
|
||||||
// mov.l
|
|
||||||
else if (opcode & 0xf000) == 0xd000 {
|
|
||||||
let target = ((opcode as u64 & 0xff) * 4 + 4 + pos) & 0xfffffffc;
|
|
||||||
let data_info = DataInfo { address: target, size: 4 };
|
|
||||||
data_offsets.insert(pos, data_info);
|
|
||||||
}
|
|
||||||
pos += 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
let pos = resolved.ins_ref.address - resolved.symbol.address;
|
|
||||||
|
|
||||||
// add the data info
|
|
||||||
if let Some(value) = data_offsets.get(&pos) {
|
|
||||||
if value.size == 2 && value.address as usize + 1 < symbol_data.len() {
|
|
||||||
let data = u16::from_be_bytes(
|
|
||||||
symbol_data[value.address as usize..value.address as usize + 2]
|
|
||||||
.try_into()
|
|
||||||
.unwrap(),
|
|
||||||
);
|
|
||||||
parts.push(InstructionPart::basic(" /* "));
|
|
||||||
parts.push(InstructionPart::basic("0x"));
|
|
||||||
parts.push(InstructionPart::basic(format!("{:04X}", data)));
|
|
||||||
parts.push(InstructionPart::basic(" */"));
|
|
||||||
} else if value.size == 4 && value.address as usize + 3 < symbol_data.len() {
|
|
||||||
let data = u32::from_be_bytes(
|
|
||||||
symbol_data[value.address as usize..value.address as usize + 4]
|
|
||||||
.try_into()
|
|
||||||
.unwrap(),
|
|
||||||
);
|
|
||||||
parts.push(InstructionPart::basic(" /* "));
|
|
||||||
parts.push(InstructionPart::basic("0x"));
|
|
||||||
parts.push(InstructionPart::basic(format!("{:08X}", data)));
|
|
||||||
parts.push(InstructionPart::basic(" */"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for part in parts {
|
|
||||||
cb(part)?;
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn implcit_addend(
|
|
||||||
&self,
|
|
||||||
_file: &object::File<'_>,
|
|
||||||
_section: &object::Section,
|
|
||||||
address: u64,
|
|
||||||
_relocation: &object::Relocation,
|
|
||||||
flags: RelocationFlags,
|
|
||||||
) -> Result<i64> {
|
|
||||||
bail!("Unsupported SuperH implicit relocation {:#x}:{:?}", address, flags)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn demangle(&self, name: &str) -> Option<String> {
|
|
||||||
cpp_demangle::Symbol::new(name)
|
|
||||||
.ok()
|
|
||||||
.and_then(|s| s.demangle(&cpp_demangle::DemangleOptions::default()).ok())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn reloc_name(&self, flags: RelocationFlags) -> Option<&'static str> {
|
|
||||||
match flags {
|
|
||||||
RelocationFlags::Elf(r_type) => match r_type {
|
|
||||||
elf::R_SH_NONE => Some("R_SH_NONE"),
|
|
||||||
elf::R_SH_DIR32 => Some("R_SH_DIR32"),
|
|
||||||
elf::R_SH_REL32 => Some("R_SH_REL32"),
|
|
||||||
elf::R_SH_DIR8WPN => Some("R_SH_DIR8WPN"),
|
|
||||||
elf::R_SH_IND12W => Some("R_SH_IND12W"),
|
|
||||||
elf::R_SH_DIR8WPL => Some("R_SH_DIR8WPL"),
|
|
||||||
elf::R_SH_DIR8WPZ => Some("R_SH_DIR8WPZ"),
|
|
||||||
elf::R_SH_DIR8BP => Some("R_SH_DIR8BP"),
|
|
||||||
elf::R_SH_DIR8W => Some("R_SH_DIR8W"),
|
|
||||||
elf::R_SH_DIR8L => Some("R_SH_DIR8L"),
|
|
||||||
elf::R_SH_SWITCH16 => Some("R_SH_SWITCH16"),
|
|
||||||
elf::R_SH_SWITCH32 => Some("R_SH_SWITCH32"),
|
|
||||||
elf::R_SH_USES => Some("R_SH_USES"),
|
|
||||||
elf::R_SH_COUNT => Some("R_SH_COUNT"),
|
|
||||||
elf::R_SH_ALIGN => Some("R_SH_ALIGN"),
|
|
||||||
elf::R_SH_CODE => Some("R_SH_CODE"),
|
|
||||||
elf::R_SH_DATA => Some("R_SH_DATA"),
|
|
||||||
elf::R_SH_LABEL => Some("R_SH_LABEL"),
|
|
||||||
elf::R_SH_SWITCH8 => Some("R_SH_SWITCH8"),
|
|
||||||
elf::R_SH_GNU_VTINHERIT => Some("R_SH_GNU_VTINHERIT"),
|
|
||||||
elf::R_SH_GNU_VTENTRY => Some("R_SH_GNU_VTENTRY"),
|
|
||||||
elf::R_SH_TLS_GD_32 => Some("R_SH_TLS_GD_32"),
|
|
||||||
elf::R_SH_TLS_LD_32 => Some("R_SH_TLS_LD_32"),
|
|
||||||
elf::R_SH_TLS_LDO_32 => Some("R_SH_TLS_LDO_32"),
|
|
||||||
elf::R_SH_TLS_IE_32 => Some("R_SH_TLS_IE_32"),
|
|
||||||
elf::R_SH_TLS_LE_32 => Some("R_SH_TLS_LE_32"),
|
|
||||||
elf::R_SH_TLS_DTPMOD32 => Some("R_SH_TLS_DTPMOD32"),
|
|
||||||
elf::R_SH_TLS_DTPOFF32 => Some("R_SH_TLS_DTPOFF32"),
|
|
||||||
elf::R_SH_TLS_TPOFF32 => Some("R_SH_TLS_TPOFF32"),
|
|
||||||
elf::R_SH_GOT32 => Some("R_SH_GOT32"),
|
|
||||||
elf::R_SH_PLT32 => Some("R_SH_PLT32"),
|
|
||||||
elf::R_SH_COPY => Some("R_SH_COPY"),
|
|
||||||
elf::R_SH_GLOB_DAT => Some("R_SH_GLOB_DAT"),
|
|
||||||
elf::R_SH_JMP_SLOT => Some("R_SH_JMP_SLOT"),
|
|
||||||
elf::R_SH_RELATIVE => Some("R_SH_RELATIVE"),
|
|
||||||
elf::R_SH_GOTOFF => Some("R_SH_GOTOFF"),
|
|
||||||
elf::R_SH_GOTPC => Some("R_SH_GOTPC"),
|
|
||||||
_ => None,
|
|
||||||
},
|
|
||||||
_ => None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn data_reloc_size(&self, flags: RelocationFlags) -> usize {
|
|
||||||
match flags {
|
|
||||||
RelocationFlags::Elf(elf::R_SH_DIR32) => 4,
|
|
||||||
RelocationFlags::Elf(_) => 1,
|
|
||||||
_ => 1,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod test {
|
|
||||||
use std::fmt::{self, Display};
|
|
||||||
|
|
||||||
use super::*;
|
|
||||||
use crate::obj::{InstructionArg, Section, SectionData, Symbol};
|
|
||||||
|
|
||||||
impl Display for InstructionPart<'_> {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
match self {
|
|
||||||
InstructionPart::Basic(s) => write!(f, "{}", s),
|
|
||||||
InstructionPart::Opcode(s, _o) => write!(f, "{} ", s),
|
|
||||||
InstructionPart::Arg(arg) => write!(f, "{}", arg),
|
|
||||||
InstructionPart::Separator => write!(f, ", "),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Display for InstructionArg<'_> {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
||||||
match self {
|
|
||||||
InstructionArg::Value(v) => write!(f, "{}", v),
|
|
||||||
InstructionArg::BranchDest(v) => write!(f, "{}", v),
|
|
||||||
InstructionArg::Reloc => write!(f, "reloc"),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_sh2_display_instruction_basic_ops() {
|
|
||||||
let arch = ArchSuperH {};
|
|
||||||
let ops: [(u16, &str); 8] = [
|
|
||||||
(0x0008, "clrt "),
|
|
||||||
(0x0028, "clrmac "),
|
|
||||||
(0x0019, "div0u "),
|
|
||||||
(0x0009, "nop "),
|
|
||||||
(0x002b, "rte "),
|
|
||||||
(0x000b, "rts "),
|
|
||||||
(0x0018, "sett "),
|
|
||||||
(0x001b, "sleep "),
|
|
||||||
];
|
|
||||||
|
|
||||||
for (opcode, expected_str) in ops {
|
|
||||||
let code = opcode.to_be_bytes();
|
|
||||||
let mut parts = Vec::new();
|
|
||||||
|
|
||||||
arch.display_instruction(
|
|
||||||
ResolvedInstructionRef {
|
|
||||||
ins_ref: InstructionRef { address: 0x1000, size: 2, opcode, branch_dest: None },
|
|
||||||
code: &code,
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
&DiffObjConfig::default(),
|
|
||||||
&mut |part| {
|
|
||||||
parts.push(part.into_static());
|
|
||||||
Ok(())
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let joined_str: String = parts.iter().map(|part| format!("{}", part)).collect();
|
|
||||||
assert_eq!(joined_str, expected_str.to_string());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_sh2_display_instruction_f0ff_ops() {
|
|
||||||
let arch = ArchSuperH {};
|
|
||||||
let ops: [(u16, &str); 49] = [
|
|
||||||
(0x4015, "cmp/pl r0"),
|
|
||||||
(0x4115, "cmp/pl r1"),
|
|
||||||
(0x4215, "cmp/pl r2"),
|
|
||||||
(0x4315, "cmp/pl r3"),
|
|
||||||
(0x4011, "cmp/pz r0"),
|
|
||||||
(0x4010, "dt r0"),
|
|
||||||
(0x0029, "movt r0"),
|
|
||||||
(0x4004, "rotl r0"),
|
|
||||||
(0x4005, "rotr r0"),
|
|
||||||
(0x4024, "rotcl r0"),
|
|
||||||
(0x4025, "rotcr r0"),
|
|
||||||
(0x4020, "shal r0"),
|
|
||||||
(0x4021, "shar r0"),
|
|
||||||
(0x4000, "shll r0"),
|
|
||||||
(0x4001, "shlr r0"),
|
|
||||||
(0x4008, "shll2 r0"),
|
|
||||||
(0x4009, "shlr2 r0"),
|
|
||||||
(0x4018, "shll8 r0"),
|
|
||||||
(0x4019, "shlr8 r0"),
|
|
||||||
(0x4028, "shll16 r0"),
|
|
||||||
(0x4029, "shlr16 r0"),
|
|
||||||
(0x0002, "stc sr, r0"),
|
|
||||||
(0x0012, "stc gbr, r0"),
|
|
||||||
(0x0022, "stc vbr, r0"),
|
|
||||||
(0x000a, "sts mach, r0"),
|
|
||||||
(0x001a, "sts macl, r0"),
|
|
||||||
(0x402a, "lds r0, pr"),
|
|
||||||
(0x401b, "tas.b r0"),
|
|
||||||
(0x4003, "stc.l sr, @-r0"),
|
|
||||||
(0x4013, "stc.l gbr, @-r0"),
|
|
||||||
(0x4023, "stc.l vbr, @-r0"),
|
|
||||||
(0x4002, "sts.l mach, @-r0"),
|
|
||||||
(0x4012, "sts.l macl, @-r0"),
|
|
||||||
(0x4022, "sts.l pr, @-r0"),
|
|
||||||
(0x400e, "ldc r0, sr"),
|
|
||||||
(0x401e, "ldc r0, gbr"),
|
|
||||||
(0x402e, "ldc r0, vbr"),
|
|
||||||
(0x400a, "lds r0, mach"),
|
|
||||||
(0x401a, "lds r0, macl"),
|
|
||||||
(0x402b, "jmp @r0"),
|
|
||||||
(0x400b, "jsr @r0"),
|
|
||||||
(0x4007, "ldc.l @r0+, sr"),
|
|
||||||
(0x4017, "ldc.l @r0+, gbr"),
|
|
||||||
(0x4027, "ldc.l @r0+, vbr"),
|
|
||||||
(0x4006, "lds.l @r0+, mach"),
|
|
||||||
(0x4016, "lds.l @r0+, macl"),
|
|
||||||
(0x4026, "lds.l @r0+, pr"),
|
|
||||||
(0x0023, "braf r0"),
|
|
||||||
(0x0003, "bsrf r0"),
|
|
||||||
];
|
|
||||||
|
|
||||||
for (opcode, expected_str) in ops {
|
|
||||||
let code = opcode.to_be_bytes();
|
|
||||||
let mut parts = Vec::new();
|
|
||||||
|
|
||||||
arch.display_instruction(
|
|
||||||
ResolvedInstructionRef {
|
|
||||||
ins_ref: InstructionRef { address: 0x1000, size: 2, opcode, branch_dest: None },
|
|
||||||
code: &code,
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
&DiffObjConfig::default(),
|
|
||||||
&mut |part| {
|
|
||||||
parts.push(part.into_static());
|
|
||||||
Ok(())
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let joined_str: String = parts.iter().map(|part| format!("{}", part)).collect();
|
|
||||||
assert_eq!(joined_str, expected_str.to_string());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_sh2_display_instructions_f00f() {
|
|
||||||
let arch = ArchSuperH {};
|
|
||||||
let ops: [(u16, &str); 54] = [
|
|
||||||
(0x300c, "add r0, r0"),
|
|
||||||
(0x300e, "addc r0, r0"),
|
|
||||||
(0x300f, "addv r0, r0"),
|
|
||||||
(0x2009, "and r0, r0"),
|
|
||||||
(0x3000, "cmp/eq r0, r0"),
|
|
||||||
(0x3002, "cmp/hs r0, r0"),
|
|
||||||
(0x3003, "cmp/ge r0, r0"),
|
|
||||||
(0x3006, "cmp/hi r0, r0"),
|
|
||||||
(0x3007, "cmp/gt r0, r0"),
|
|
||||||
(0x200c, "cmp/str r0, r0"),
|
|
||||||
(0x3004, "div1 r0, r0"),
|
|
||||||
(0x2007, "div0s r0, r0"),
|
|
||||||
(0x300d, "dmuls.l r0, r0"),
|
|
||||||
(0x3005, "dmulu.l r0, r0"),
|
|
||||||
(0x600e, "exts.b r0, r0"),
|
|
||||||
(0x600f, "exts.w r0, r0"),
|
|
||||||
(0x600c, "extu.b r0, r0"),
|
|
||||||
(0x600d, "extu.w r0, r0"),
|
|
||||||
(0x6003, "mov r0, r0"),
|
|
||||||
(0x0007, "mul.l r0, r0"),
|
|
||||||
(0x200f, "muls r0, r0"),
|
|
||||||
(0x200e, "mulu r0, r0"),
|
|
||||||
(0x600b, "neg r0, r0"),
|
|
||||||
(0x600a, "negc r0, r0"),
|
|
||||||
(0x6007, "not r0, r0"),
|
|
||||||
(0x200b, "or r0, r0"),
|
|
||||||
(0x3008, "sub r0, r0"),
|
|
||||||
(0x300a, "subc r0, r0"),
|
|
||||||
(0x300b, "subv r0, r0"),
|
|
||||||
(0x6008, "swap.b r0, r0"),
|
|
||||||
(0x6009, "swap.w r0, r0"),
|
|
||||||
(0x2008, "tst r0, r0"),
|
|
||||||
(0x200a, "xor r0, r0"),
|
|
||||||
(0x200d, "xtrct r0, r0"),
|
|
||||||
(0x2000, "mov.b r0, @r0"),
|
|
||||||
(0x2001, "mov.w r0, @r0"),
|
|
||||||
(0x2002, "mov.l r0, @r0"),
|
|
||||||
(0x6000, "mov.b @r0, r0"),
|
|
||||||
(0x6001, "mov.w @r0, r0"),
|
|
||||||
(0x6002, "mov.l @r0, r0"),
|
|
||||||
(0x000f, "mac.l @r0+, @r0+"),
|
|
||||||
(0x400f, "mac.w @r0+, @r0+"),
|
|
||||||
(0x6004, "mov.b @r0+, r0"),
|
|
||||||
(0x6005, "mov.w @r0+, r0"),
|
|
||||||
(0x6006, "mov.l @r0+, r0"),
|
|
||||||
(0x2004, "mov.b r0, @-r0"),
|
|
||||||
(0x2005, "mov.w r0, @-r0"),
|
|
||||||
(0x2006, "mov.l r0, @-r0"),
|
|
||||||
(0x0004, "mov.b r0, @(r0, r0)"),
|
|
||||||
(0x0005, "mov.w r0, @(r0, r0)"),
|
|
||||||
(0x0006, "mov.l r0, @(r0, r0)"),
|
|
||||||
(0x000c, "mov.b @(r0, r0), r0"),
|
|
||||||
(0x000d, "mov.w @(r0, r0), r0"),
|
|
||||||
(0x000e, "mov.l @(r0, r0), r0"),
|
|
||||||
];
|
|
||||||
|
|
||||||
for (opcode, expected_str) in ops {
|
|
||||||
let code = opcode.to_be_bytes();
|
|
||||||
let mut parts = Vec::new();
|
|
||||||
|
|
||||||
arch.display_instruction(
|
|
||||||
ResolvedInstructionRef {
|
|
||||||
ins_ref: InstructionRef { address: 0x1000, size: 2, opcode, branch_dest: None },
|
|
||||||
code: &code,
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
&DiffObjConfig::default(),
|
|
||||||
&mut |part| {
|
|
||||||
parts.push(part.into_static());
|
|
||||||
Ok(())
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let joined_str: String = parts.iter().map(|part| format!("{}", part)).collect();
|
|
||||||
assert_eq!(joined_str, expected_str.to_string());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_sh2_display_instruction_mov_immediate_offset() {
|
|
||||||
let arch = ArchSuperH {};
|
|
||||||
let ops: [(u16, &str); 8] = [
|
|
||||||
(0x8000, "mov.b r0, @(0x0, r0)"),
|
|
||||||
(0x8011, "mov.b r0, @(0x1, r1)"),
|
|
||||||
(0x8102, "mov.w r0, @(0x4, r0)"),
|
|
||||||
(0x8113, "mov.w r0, @(0x6, r1)"),
|
|
||||||
(0x8404, "mov.b @(0x4, r0), r0"),
|
|
||||||
(0x8415, "mov.b @(0x5, r1), r0"),
|
|
||||||
(0x8506, "mov.w @(0xc, r0), r0"),
|
|
||||||
(0x8517, "mov.w @(0xe, r1), r0"),
|
|
||||||
];
|
|
||||||
|
|
||||||
for (opcode, expected_str) in ops {
|
|
||||||
let code = opcode.to_be_bytes();
|
|
||||||
let mut parts = Vec::new();
|
|
||||||
|
|
||||||
arch.display_instruction(
|
|
||||||
ResolvedInstructionRef {
|
|
||||||
ins_ref: InstructionRef { address: 0x1000, size: 2, opcode, branch_dest: None },
|
|
||||||
code: &code,
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
&DiffObjConfig::default(),
|
|
||||||
&mut |part| {
|
|
||||||
parts.push(part.into_static());
|
|
||||||
Ok(())
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let joined_str: String = parts.iter().map(|part| format!("{}", part)).collect();
|
|
||||||
assert_eq!(joined_str, expected_str.to_string());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_sh2_display_instruction_gbr_and_branches() {
|
|
||||||
let arch = ArchSuperH {};
|
|
||||||
let ops: &[(u16, u32, &str)] = &[
|
|
||||||
(0xc000, 0x0000, "mov.b r0, @(0x0, gbr)"),
|
|
||||||
(0xc07f, 0x0000, "mov.b r0, @(0x7f, gbr)"),
|
|
||||||
(0xc100, 0x0000, "mov.w r0, @(0x0, gbr)"),
|
|
||||||
(0xc17f, 0x0000, "mov.w r0, @(0xfe, gbr)"),
|
|
||||||
(0xc200, 0x0000, "mov.l r0, @(0x0, gbr)"),
|
|
||||||
(0xc27f, 0x0000, "mov.l r0, @(0x1fc, gbr)"),
|
|
||||||
(0xc400, 0x0000, "mov.b @(0x0, gbr), r0"),
|
|
||||||
(0xc47f, 0x0000, "mov.b @(0x7f, gbr), r0"),
|
|
||||||
(0xc500, 0x0000, "mov.w @(0x0, gbr), r0"),
|
|
||||||
(0xc57f, 0x0000, "mov.w @(0xfe, gbr), r0"),
|
|
||||||
(0xc600, 0x0000, "mov.l @(0x0, gbr), r0"),
|
|
||||||
(0xc67f, 0x0000, "mov.l @(0x1fc, gbr), r0"),
|
|
||||||
(0x8b20, 0x1000, "bf 0x44"),
|
|
||||||
(0x8b80, 0x1000, "bf 0xffffff04"),
|
|
||||||
(0x8f10, 0x2000, "bf.s 0x24"),
|
|
||||||
(0x8f90, 0x2000, "bf.s 0xffffff24"),
|
|
||||||
(0x8904, 0x3000, "bt 0xc"),
|
|
||||||
(0x8980, 0x3000, "bt 0xffffff04"),
|
|
||||||
(0x8d04, 0x4000, "bt.s 0xc"),
|
|
||||||
(0x8d80, 0x4000, "bt.s 0xffffff04"),
|
|
||||||
];
|
|
||||||
|
|
||||||
for &(opcode, addr, expected_str) in ops {
|
|
||||||
let code = opcode.to_be_bytes();
|
|
||||||
let mut parts = Vec::new();
|
|
||||||
|
|
||||||
arch.display_instruction(
|
|
||||||
ResolvedInstructionRef {
|
|
||||||
ins_ref: InstructionRef {
|
|
||||||
address: addr as u64,
|
|
||||||
size: 2,
|
|
||||||
opcode,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
code: &code,
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
&DiffObjConfig::default(),
|
|
||||||
&mut |part| {
|
|
||||||
parts.push(part.into_static());
|
|
||||||
Ok(())
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let joined_str: String = parts.iter().map(|part| format!("{}", part)).collect();
|
|
||||||
assert_eq!(joined_str, expected_str.to_string());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_sh2_display_instruction_mov_l() {
|
|
||||||
let arch = ArchSuperH {};
|
|
||||||
let ops: &[(u16, u32, &str)] = &[
|
|
||||||
// mov.l rX, @(0xXXX, rY)
|
|
||||||
(0x1000, 0x0000, "mov.l r0, @(0x0, r0)"),
|
|
||||||
(0x1001, 0x0000, "mov.l r0, @(0x4, r0)"),
|
|
||||||
(0x100f, 0x0000, "mov.l r0, @(0x3c, r0)"),
|
|
||||||
(0x101f, 0x0000, "mov.l r1, @(0x3c, r0)"),
|
|
||||||
// mov.l @(0xXXX, rY), rX
|
|
||||||
(0x5000, 0x0000, "mov.l @(0x0, r0), r0"),
|
|
||||||
];
|
|
||||||
|
|
||||||
for &(opcode, addr, expected_str) in ops {
|
|
||||||
let code = opcode.to_be_bytes();
|
|
||||||
let mut parts = Vec::new();
|
|
||||||
|
|
||||||
arch.display_instruction(
|
|
||||||
ResolvedInstructionRef {
|
|
||||||
ins_ref: InstructionRef {
|
|
||||||
address: addr as u64,
|
|
||||||
size: 2,
|
|
||||||
opcode,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
code: &code,
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
&DiffObjConfig::default(),
|
|
||||||
&mut |part| {
|
|
||||||
parts.push(part.into_static());
|
|
||||||
Ok(())
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let joined_str: String = parts.iter().map(|part| format!("{}", part)).collect();
|
|
||||||
assert_eq!(joined_str, expected_str.to_string());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_sh2_display_instruction_bra_bsr() {
|
|
||||||
let arch: ArchSuperH = ArchSuperH {};
|
|
||||||
let ops: &[(u16, u32, &str)] = &[
|
|
||||||
// bra
|
|
||||||
(0xa000, 0x0000, "bra 0x4"),
|
|
||||||
(0xa001, 0x0000, "bra 0x6"),
|
|
||||||
(0xa800, 0x0000, "bra 0xfffff004"),
|
|
||||||
(0xa801, 0x0000, "bra 0xfffff006"),
|
|
||||||
// bsr
|
|
||||||
(0xb000, 0x0000, "bsr 0x4"),
|
|
||||||
(0xb001, 0x0000, "bsr 0x6"),
|
|
||||||
(0xb800, 0x0000, "bsr 0xfffff004"),
|
|
||||||
(0xb801, 0x0000, "bsr 0xfffff006"),
|
|
||||||
];
|
|
||||||
|
|
||||||
for &(opcode, addr, expected_str) in ops {
|
|
||||||
let code = opcode.to_be_bytes();
|
|
||||||
let mut parts = Vec::new();
|
|
||||||
|
|
||||||
arch.display_instruction(
|
|
||||||
ResolvedInstructionRef {
|
|
||||||
ins_ref: InstructionRef {
|
|
||||||
address: addr as u64,
|
|
||||||
size: 2,
|
|
||||||
opcode,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
code: &code,
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
&DiffObjConfig::default(),
|
|
||||||
&mut |part| {
|
|
||||||
parts.push(part.into_static());
|
|
||||||
Ok(())
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let joined_str: String = parts.iter().map(|part| format!("{}", part)).collect();
|
|
||||||
assert_eq!(joined_str, expected_str.to_string());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_sh2_display_instruction_operations() {
|
|
||||||
let arch = ArchSuperH {};
|
|
||||||
let ops: &[(u16, u32, &str)] = &[
|
|
||||||
(0xcdff, 0x0000, "and.b #0xff, @(r0, gbr)"),
|
|
||||||
(0xcfff, 0x0000, "or.b #0xff, @(r0, gbr)"),
|
|
||||||
(0xccff, 0x0000, "tst.b #0xff, @(r0, gbr)"),
|
|
||||||
(0xceff, 0x0000, "xor.b #0xff, @(r0, gbr)"),
|
|
||||||
(0xc9ff, 0x0000, "and #0xff, r0"),
|
|
||||||
(0x88ff, 0x0000, "cmp/eq #0xff, r0"),
|
|
||||||
(0xcbff, 0x0000, "or #0xff, r0"),
|
|
||||||
(0xc8ff, 0x0000, "tst #0xff, r0"),
|
|
||||||
(0xcaff, 0x0000, "xor #0xff, r0"),
|
|
||||||
(0xc3ff, 0x0000, "trapa #0xff"),
|
|
||||||
];
|
|
||||||
|
|
||||||
for &(opcode, addr, expected_str) in ops {
|
|
||||||
let code = opcode.to_be_bytes();
|
|
||||||
let mut parts = Vec::new();
|
|
||||||
|
|
||||||
arch.display_instruction(
|
|
||||||
ResolvedInstructionRef {
|
|
||||||
ins_ref: InstructionRef {
|
|
||||||
address: addr as u64,
|
|
||||||
size: 2,
|
|
||||||
opcode,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
code: &code,
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
&DiffObjConfig::default(),
|
|
||||||
&mut |part| {
|
|
||||||
parts.push(part.into_static());
|
|
||||||
Ok(())
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let joined_str: String = parts.iter().map(|part| format!("{}", part)).collect();
|
|
||||||
assert_eq!(joined_str, expected_str.to_string());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_sh2_add_mov_unknown_instructions() {
|
|
||||||
let arch = ArchSuperH {};
|
|
||||||
let ops: &[(u16, u32, &str)] = &[
|
|
||||||
(0x70FF, 0x0000, "add #0xff, r0"),
|
|
||||||
(0xE0FF, 0x0000, "mov #0xff, r0"),
|
|
||||||
(0x0000, 0x0000, ".word 0x0000 /* unknown instruction */"),
|
|
||||||
];
|
|
||||||
|
|
||||||
for &(opcode, addr, expected_str) in ops {
|
|
||||||
let code = opcode.to_be_bytes();
|
|
||||||
let mut parts = Vec::new();
|
|
||||||
|
|
||||||
arch.display_instruction(
|
|
||||||
ResolvedInstructionRef {
|
|
||||||
ins_ref: InstructionRef {
|
|
||||||
address: addr as u64,
|
|
||||||
size: 2,
|
|
||||||
opcode,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
code: &code,
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
&DiffObjConfig::default(),
|
|
||||||
&mut |part| {
|
|
||||||
parts.push(part.into_static());
|
|
||||||
Ok(())
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let joined_str: String = parts.iter().map(|part| format!("{}", part)).collect();
|
|
||||||
assert_eq!(joined_str, expected_str.to_string());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_sh2_mov_instructions_with_labels() {
|
|
||||||
let arch = ArchSuperH {};
|
|
||||||
let ops: &[(u16, u32, &str)] =
|
|
||||||
&[(0x9000, 0x0000, "mov.w @(0x4, pc), r0"), (0xd000, 0x0000, "mov.l @(0x4, pc), r0")];
|
|
||||||
|
|
||||||
for &(opcode, addr, expected_str) in ops {
|
|
||||||
let code = opcode.to_be_bytes();
|
|
||||||
let mut parts = Vec::new();
|
|
||||||
|
|
||||||
arch.display_instruction(
|
|
||||||
ResolvedInstructionRef {
|
|
||||||
ins_ref: InstructionRef {
|
|
||||||
address: addr as u64,
|
|
||||||
size: 2,
|
|
||||||
opcode,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
code: &code,
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
&DiffObjConfig::default(),
|
|
||||||
&mut |part| {
|
|
||||||
parts.push(part.into_static());
|
|
||||||
Ok(())
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let joined_str: String = parts.iter().map(|part| format!("{}", part)).collect();
|
|
||||||
assert_eq!(joined_str, expected_str.to_string());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_func_0606_f378_mov_w_data_labeling() {
|
|
||||||
let arch = ArchSuperH {};
|
|
||||||
let ops: &[(u16, u32, &str)] = &[(0x9000, 0x0606F378, "mov.w @(0x4, pc), r0 /* 0x00B0 */")];
|
|
||||||
|
|
||||||
let mut code = Vec::new();
|
|
||||||
code.extend_from_slice(&0x9000_u16.to_be_bytes());
|
|
||||||
code.extend_from_slice(&0x0009_u16.to_be_bytes());
|
|
||||||
code.extend_from_slice(&0x00B0_u16.to_be_bytes());
|
|
||||||
|
|
||||||
for &(opcode, addr, expected_str) in ops {
|
|
||||||
let mut parts = Vec::new();
|
|
||||||
|
|
||||||
arch.display_instruction(
|
|
||||||
ResolvedInstructionRef {
|
|
||||||
ins_ref: InstructionRef {
|
|
||||||
address: addr as u64,
|
|
||||||
size: 2,
|
|
||||||
opcode,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
code: &opcode.to_be_bytes(),
|
|
||||||
symbol: &Symbol {
|
|
||||||
address: 0x0606F378, // func base address
|
|
||||||
size: code.len() as u64,
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
section: &Section {
|
|
||||||
address: 0x0606F378,
|
|
||||||
size: code.len() as u64,
|
|
||||||
data: SectionData(code.clone()),
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
&DiffObjConfig::default(),
|
|
||||||
&mut |part| {
|
|
||||||
parts.push(part.into_static());
|
|
||||||
Ok(())
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let joined_str: String = parts.iter().map(|part| format!("{}", part)).collect();
|
|
||||||
assert_eq!(joined_str, expected_str.to_string());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_func_0606_f378_mov_l_data_labeling() {
|
|
||||||
let arch = ArchSuperH {};
|
|
||||||
let ops: &[(u16, u32, &str)] =
|
|
||||||
&[(0xd000, 0x0606F378, "mov.l @(0x4, pc), r0 /* 0x00B000B0 */")];
|
|
||||||
|
|
||||||
let mut code = Vec::new();
|
|
||||||
code.extend_from_slice(&0xd000_u16.to_be_bytes());
|
|
||||||
code.extend_from_slice(&0x0009_u16.to_be_bytes());
|
|
||||||
code.extend_from_slice(&0x00B0_u16.to_be_bytes());
|
|
||||||
code.extend_from_slice(&0x00B0_u16.to_be_bytes());
|
|
||||||
|
|
||||||
for &(opcode, addr, expected_str) in ops {
|
|
||||||
let mut parts = Vec::new();
|
|
||||||
|
|
||||||
arch.display_instruction(
|
|
||||||
ResolvedInstructionRef {
|
|
||||||
ins_ref: InstructionRef {
|
|
||||||
address: addr as u64,
|
|
||||||
size: 2,
|
|
||||||
opcode,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
code: &opcode.to_be_bytes(),
|
|
||||||
symbol: &Symbol {
|
|
||||||
address: 0x0606F378, // func base address
|
|
||||||
size: code.len() as u64,
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
section: &Section {
|
|
||||||
address: 0x0606F378,
|
|
||||||
size: code.len() as u64,
|
|
||||||
data: SectionData(code.clone()),
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
&DiffObjConfig::default(),
|
|
||||||
&mut |part| {
|
|
||||||
parts.push(part.into_static());
|
|
||||||
Ok(())
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let joined_str: String = parts.iter().map(|part| format!("{}", part)).collect();
|
|
||||||
assert_eq!(joined_str, expected_str.to_string());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,17 +1,16 @@
|
|||||||
use alloc::{boxed::Box, format, string::String, vec::Vec};
|
use alloc::{boxed::Box, string::String, vec::Vec};
|
||||||
use core::cmp::Ordering;
|
|
||||||
|
|
||||||
use anyhow::{Context, Result, anyhow, bail};
|
use anyhow::{Result, anyhow, bail};
|
||||||
use iced_x86::{
|
use iced_x86::{
|
||||||
Decoder, DecoderOptions, DecoratorKind, FormatterOutput, FormatterTextKind, GasFormatter,
|
Decoder, DecoderOptions, DecoratorKind, FormatterOutput, FormatterTextKind, GasFormatter,
|
||||||
Instruction, IntelFormatter, MasmFormatter, NasmFormatter, NumberKind, OpKind, Register,
|
Instruction, IntelFormatter, MasmFormatter, NasmFormatter, NumberKind, OpKind, Register,
|
||||||
};
|
};
|
||||||
use object::{Endian as _, Object as _, ObjectSection as _, elf, pe};
|
use object::{Endian as _, Object as _, ObjectSection as _, pe};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
arch::Arch,
|
arch::Arch,
|
||||||
diff::{DiffObjConfig, X86Formatter, display::InstructionPart},
|
diff::{DiffObjConfig, X86Formatter, display::InstructionPart},
|
||||||
obj::{InstructionRef, Relocation, RelocationFlags, ResolvedInstructionRef},
|
obj::{InstructionRef, RelocationFlags, ResolvedInstructionRef, ScannedInstruction},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
@ -67,70 +66,32 @@ impl ArchX86 {
|
|||||||
pe::IMAGE_REL_I386_DIR32 | pe::IMAGE_REL_I386_REL32 => Some(4),
|
pe::IMAGE_REL_I386_DIR32 | pe::IMAGE_REL_I386_REL32 => Some(4),
|
||||||
_ => None,
|
_ => None,
|
||||||
},
|
},
|
||||||
RelocationFlags::Elf(typ) => match typ {
|
|
||||||
elf::R_386_32 | elf::R_386_PC32 => Some(4),
|
|
||||||
elf::R_386_16 => Some(2),
|
|
||||||
_ => None,
|
_ => None,
|
||||||
},
|
},
|
||||||
},
|
|
||||||
Architecture::X86_64 => match flags {
|
Architecture::X86_64 => match flags {
|
||||||
RelocationFlags::Coff(typ) => match typ {
|
RelocationFlags::Coff(typ) => match typ {
|
||||||
pe::IMAGE_REL_AMD64_ADDR32NB | pe::IMAGE_REL_AMD64_REL32 => Some(4),
|
pe::IMAGE_REL_AMD64_ADDR32NB | pe::IMAGE_REL_AMD64_REL32 => Some(4),
|
||||||
pe::IMAGE_REL_AMD64_ADDR64 => Some(8),
|
pe::IMAGE_REL_AMD64_ADDR64 => Some(8),
|
||||||
_ => None,
|
_ => None,
|
||||||
},
|
},
|
||||||
RelocationFlags::Elf(typ) => match typ {
|
|
||||||
elf::R_X86_64_PC32 => Some(4),
|
|
||||||
elf::R_X86_64_64 => Some(8),
|
|
||||||
_ => None,
|
_ => None,
|
||||||
},
|
},
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const DATA_OPCODE: u16 = u16::MAX - 1;
|
|
||||||
|
|
||||||
impl Arch for ArchX86 {
|
impl Arch for ArchX86 {
|
||||||
fn scan_instructions_internal(
|
fn scan_instructions(
|
||||||
&self,
|
&self,
|
||||||
address: u64,
|
address: u64,
|
||||||
code: &[u8],
|
code: &[u8],
|
||||||
_section_index: usize,
|
_section_index: usize,
|
||||||
relocations: &[Relocation],
|
|
||||||
_diff_config: &DiffObjConfig,
|
_diff_config: &DiffObjConfig,
|
||||||
) -> Result<Vec<InstructionRef>> {
|
) -> Result<Vec<ScannedInstruction>> {
|
||||||
let mut out = Vec::with_capacity(code.len() / 2);
|
let mut out = Vec::with_capacity(code.len() / 2);
|
||||||
let mut decoder = self.decoder(code, address);
|
let mut decoder = self.decoder(code, address);
|
||||||
let mut instruction = Instruction::default();
|
let mut instruction = Instruction::default();
|
||||||
let mut reloc_iter = relocations.iter().peekable();
|
while decoder.can_decode() {
|
||||||
'outer: while decoder.can_decode() {
|
|
||||||
let address = decoder.ip();
|
|
||||||
while let Some(reloc) = reloc_iter.peek() {
|
|
||||||
match reloc.address.cmp(&address) {
|
|
||||||
Ordering::Less => {
|
|
||||||
reloc_iter.next();
|
|
||||||
}
|
|
||||||
Ordering::Equal => {
|
|
||||||
// If the instruction starts at a relocation, it's inline data
|
|
||||||
let size = self.reloc_size(reloc.flags).with_context(|| {
|
|
||||||
format!("Unsupported inline x86 relocation {:?}", reloc.flags)
|
|
||||||
})?;
|
|
||||||
if decoder.set_position(decoder.position() + size).is_ok() {
|
|
||||||
decoder.set_ip(address + size as u64);
|
|
||||||
out.push(InstructionRef {
|
|
||||||
address,
|
|
||||||
size: size as u8,
|
|
||||||
opcode: DATA_OPCODE,
|
|
||||||
branch_dest: None,
|
|
||||||
});
|
|
||||||
reloc_iter.next();
|
|
||||||
continue 'outer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Ordering::Greater => break,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
decoder.decode_out(&mut instruction);
|
decoder.decode_out(&mut instruction);
|
||||||
let branch_dest = match instruction.op0_kind() {
|
let branch_dest = match instruction.op0_kind() {
|
||||||
OpKind::NearBranch16 => Some(instruction.near_branch16() as u64),
|
OpKind::NearBranch16 => Some(instruction.near_branch16() as u64),
|
||||||
@ -138,10 +99,12 @@ impl Arch for ArchX86 {
|
|||||||
OpKind::NearBranch64 => Some(instruction.near_branch64()),
|
OpKind::NearBranch64 => Some(instruction.near_branch64()),
|
||||||
_ => None,
|
_ => None,
|
||||||
};
|
};
|
||||||
out.push(InstructionRef {
|
out.push(ScannedInstruction {
|
||||||
address,
|
ins_ref: InstructionRef {
|
||||||
|
address: instruction.ip(),
|
||||||
size: instruction.len() as u8,
|
size: instruction.len() as u8,
|
||||||
opcode: instruction.mnemonic() as u16,
|
opcode: instruction.mnemonic() as u16,
|
||||||
|
},
|
||||||
branch_dest,
|
branch_dest,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -154,21 +117,6 @@ impl Arch for ArchX86 {
|
|||||||
diff_config: &DiffObjConfig,
|
diff_config: &DiffObjConfig,
|
||||||
cb: &mut dyn FnMut(InstructionPart) -> Result<()>,
|
cb: &mut dyn FnMut(InstructionPart) -> Result<()>,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
if resolved.ins_ref.opcode == DATA_OPCODE {
|
|
||||||
let (mnemonic, imm) = match resolved.ins_ref.size {
|
|
||||||
2 => (".word", self.endianness.read_u16_bytes(resolved.code.try_into()?) as u64),
|
|
||||||
4 => (".dword", self.endianness.read_u32_bytes(resolved.code.try_into()?) as u64),
|
|
||||||
_ => bail!("Unsupported x86 inline data size {}", resolved.ins_ref.size),
|
|
||||||
};
|
|
||||||
cb(InstructionPart::opcode(mnemonic, DATA_OPCODE))?;
|
|
||||||
if resolved.relocation.is_some() {
|
|
||||||
cb(InstructionPart::reloc())?;
|
|
||||||
} else {
|
|
||||||
cb(InstructionPart::unsigned(imm))?;
|
|
||||||
}
|
|
||||||
return Ok(());
|
|
||||||
}
|
|
||||||
|
|
||||||
let mut decoder = self.decoder(resolved.code, resolved.ins_ref.address);
|
let mut decoder = self.decoder(resolved.code, resolved.ins_ref.address);
|
||||||
let mut formatter = self.formatter(diff_config);
|
let mut formatter = self.formatter(diff_config);
|
||||||
let mut instruction = Instruction::default();
|
let mut instruction = Instruction::default();
|
||||||
@ -235,8 +183,7 @@ impl Arch for ArchX86 {
|
|||||||
) -> Result<i64> {
|
) -> Result<i64> {
|
||||||
match self.arch {
|
match self.arch {
|
||||||
Architecture::X86 => match flags {
|
Architecture::X86 => match flags {
|
||||||
RelocationFlags::Coff(pe::IMAGE_REL_I386_DIR32 | pe::IMAGE_REL_I386_REL32)
|
RelocationFlags::Coff(pe::IMAGE_REL_I386_DIR32 | pe::IMAGE_REL_I386_REL32) => {
|
||||||
| RelocationFlags::Elf(elf::R_386_32 | elf::R_386_PC32) => {
|
|
||||||
let data =
|
let data =
|
||||||
section.data()?[address as usize..address as usize + 4].try_into()?;
|
section.data()?[address as usize..address as usize + 4].try_into()?;
|
||||||
Ok(self.endianness.read_i32_bytes(data) as i64)
|
Ok(self.endianness.read_i32_bytes(data) as i64)
|
||||||
@ -244,14 +191,12 @@ impl Arch for ArchX86 {
|
|||||||
flags => bail!("Unsupported x86 implicit relocation {flags:?}"),
|
flags => bail!("Unsupported x86 implicit relocation {flags:?}"),
|
||||||
},
|
},
|
||||||
Architecture::X86_64 => match flags {
|
Architecture::X86_64 => match flags {
|
||||||
RelocationFlags::Coff(pe::IMAGE_REL_AMD64_ADDR32NB | pe::IMAGE_REL_AMD64_REL32)
|
RelocationFlags::Coff(pe::IMAGE_REL_AMD64_ADDR32NB | pe::IMAGE_REL_AMD64_REL32) => {
|
||||||
| RelocationFlags::Elf(elf::R_X86_64_32 | elf::R_X86_64_PC32) => {
|
|
||||||
let data =
|
let data =
|
||||||
section.data()?[address as usize..address as usize + 4].try_into()?;
|
section.data()?[address as usize..address as usize + 4].try_into()?;
|
||||||
Ok(self.endianness.read_i32_bytes(data) as i64)
|
Ok(self.endianness.read_i32_bytes(data) as i64)
|
||||||
}
|
}
|
||||||
RelocationFlags::Coff(pe::IMAGE_REL_AMD64_ADDR64)
|
RelocationFlags::Coff(pe::IMAGE_REL_AMD64_ADDR64) => {
|
||||||
| RelocationFlags::Elf(elf::R_X86_64_64) => {
|
|
||||||
let data =
|
let data =
|
||||||
section.data()?[address as usize..address as usize + 8].try_into()?;
|
section.data()?[address as usize..address as usize + 8].try_into()?;
|
||||||
Ok(self.endianness.read_i64_bytes(data))
|
Ok(self.endianness.read_i64_bytes(data))
|
||||||
@ -384,7 +329,6 @@ impl FormatterOutput for InstructionFormatterOutput<'_> {
|
|||||||
(NumberKind::Int8 | NumberKind::UInt8, 1)
|
(NumberKind::Int8 | NumberKind::UInt8, 1)
|
||||||
| (NumberKind::Int16 | NumberKind::UInt16, 2)
|
| (NumberKind::Int16 | NumberKind::UInt16, 2)
|
||||||
| (NumberKind::Int32 | NumberKind::UInt32, 4)
|
| (NumberKind::Int32 | NumberKind::UInt32, 4)
|
||||||
| (NumberKind::Int64 | NumberKind::UInt64, 4) // x86_64
|
|
||||||
| (NumberKind::Int64 | NumberKind::UInt64, 8) => true,
|
| (NumberKind::Int64 | NumberKind::UInt64, 8) => true,
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
@ -462,16 +406,15 @@ mod test {
|
|||||||
0xc7, 0x85, 0x68, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x8b, 0x04, 0x85, 0x00,
|
0xc7, 0x85, 0x68, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x8b, 0x04, 0x85, 0x00,
|
||||||
0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00,
|
||||||
];
|
];
|
||||||
let scanned =
|
let scanned = arch.scan_instructions(0, &code, 0, &DiffObjConfig::default()).unwrap();
|
||||||
arch.scan_instructions_internal(0, &code, 0, &[], &DiffObjConfig::default()).unwrap();
|
|
||||||
assert_eq!(scanned.len(), 2);
|
assert_eq!(scanned.len(), 2);
|
||||||
assert_eq!(scanned[0].address, 0);
|
assert_eq!(scanned[0].ins_ref.address, 0);
|
||||||
assert_eq!(scanned[0].size, 10);
|
assert_eq!(scanned[0].ins_ref.size, 10);
|
||||||
assert_eq!(scanned[0].opcode, iced_x86::Mnemonic::Mov as u16);
|
assert_eq!(scanned[0].ins_ref.opcode, iced_x86::Mnemonic::Mov as u16);
|
||||||
assert_eq!(scanned[0].branch_dest, None);
|
assert_eq!(scanned[0].branch_dest, None);
|
||||||
assert_eq!(scanned[1].address, 10);
|
assert_eq!(scanned[1].ins_ref.address, 10);
|
||||||
assert_eq!(scanned[1].size, 7);
|
assert_eq!(scanned[1].ins_ref.size, 7);
|
||||||
assert_eq!(scanned[1].opcode, iced_x86::Mnemonic::Mov as u16);
|
assert_eq!(scanned[1].ins_ref.opcode, iced_x86::Mnemonic::Mov as u16);
|
||||||
assert_eq!(scanned[1].branch_dest, None);
|
assert_eq!(scanned[1].branch_dest, None);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -483,7 +426,7 @@ mod test {
|
|||||||
let mut parts = Vec::new();
|
let mut parts = Vec::new();
|
||||||
arch.display_instruction(
|
arch.display_instruction(
|
||||||
ResolvedInstructionRef {
|
ResolvedInstructionRef {
|
||||||
ins_ref: InstructionRef { address: 0x1234, size: 10, opcode, branch_dest: None },
|
ins_ref: InstructionRef { address: 0x1234, size: 10, opcode },
|
||||||
code: &code,
|
code: &code,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
@ -519,7 +462,7 @@ mod test {
|
|||||||
let mut parts = Vec::new();
|
let mut parts = Vec::new();
|
||||||
arch.display_instruction(
|
arch.display_instruction(
|
||||||
ResolvedInstructionRef {
|
ResolvedInstructionRef {
|
||||||
ins_ref: InstructionRef { address: 0x1234, size: 10, opcode, branch_dest: None },
|
ins_ref: InstructionRef { address: 0x1234, size: 10, opcode },
|
||||||
code: &code,
|
code: &code,
|
||||||
relocation: Some(ResolvedRelocation {
|
relocation: Some(ResolvedRelocation {
|
||||||
relocation: &Relocation {
|
relocation: &Relocation {
|
||||||
@ -564,7 +507,7 @@ mod test {
|
|||||||
let mut parts = Vec::new();
|
let mut parts = Vec::new();
|
||||||
arch.display_instruction(
|
arch.display_instruction(
|
||||||
ResolvedInstructionRef {
|
ResolvedInstructionRef {
|
||||||
ins_ref: InstructionRef { address: 0x1234, size: 7, opcode, branch_dest: None },
|
ins_ref: InstructionRef { address: 0x1234, size: 7, opcode },
|
||||||
code: &code,
|
code: &code,
|
||||||
relocation: Some(ResolvedRelocation {
|
relocation: Some(ResolvedRelocation {
|
||||||
relocation: &Relocation {
|
relocation: &Relocation {
|
||||||
@ -607,7 +550,7 @@ mod test {
|
|||||||
let mut parts = Vec::new();
|
let mut parts = Vec::new();
|
||||||
arch.display_instruction(
|
arch.display_instruction(
|
||||||
ResolvedInstructionRef {
|
ResolvedInstructionRef {
|
||||||
ins_ref: InstructionRef { address: 0x1234, size: 5, opcode, branch_dest: None },
|
ins_ref: InstructionRef { address: 0x1234, size: 5, opcode },
|
||||||
code: &code,
|
code: &code,
|
||||||
relocation: Some(ResolvedRelocation {
|
relocation: Some(ResolvedRelocation {
|
||||||
relocation: &Relocation {
|
relocation: &Relocation {
|
||||||
@ -638,7 +581,7 @@ mod test {
|
|||||||
let mut parts = Vec::new();
|
let mut parts = Vec::new();
|
||||||
arch.display_instruction(
|
arch.display_instruction(
|
||||||
ResolvedInstructionRef {
|
ResolvedInstructionRef {
|
||||||
ins_ref: InstructionRef { address: 0x1234, size: 6, opcode, branch_dest: None },
|
ins_ref: InstructionRef { address: 0x1234, size: 6, opcode },
|
||||||
code: &code,
|
code: &code,
|
||||||
relocation: Some(ResolvedRelocation {
|
relocation: Some(ResolvedRelocation {
|
||||||
relocation: &Relocation {
|
relocation: &Relocation {
|
||||||
@ -668,74 +611,4 @@ mod test {
|
|||||||
InstructionPart::basic("]"),
|
InstructionPart::basic("]"),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_process_x86_64_instruction_with_reloc_1() {
|
|
||||||
let arch = ArchX86 { arch: Architecture::X86_64, endianness: object::Endianness::Little };
|
|
||||||
let code = [0x48, 0x8b, 0x05, 0x00, 0x00, 0x00, 0x00];
|
|
||||||
let opcode = iced_x86::Mnemonic::Mov as u16;
|
|
||||||
let mut parts = Vec::new();
|
|
||||||
arch.display_instruction(
|
|
||||||
ResolvedInstructionRef {
|
|
||||||
ins_ref: InstructionRef { address: 0x1234, size: 7, opcode, branch_dest: None },
|
|
||||||
code: &code,
|
|
||||||
relocation: Some(ResolvedRelocation {
|
|
||||||
relocation: &Relocation {
|
|
||||||
flags: RelocationFlags::Coff(pe::IMAGE_REL_AMD64_REL32),
|
|
||||||
address: 0x1234 + 3,
|
|
||||||
target_symbol: 0,
|
|
||||||
addend: 0,
|
|
||||||
},
|
|
||||||
symbol: &Default::default(),
|
|
||||||
}),
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
&DiffObjConfig::default(),
|
|
||||||
&mut |part| {
|
|
||||||
parts.push(part.into_static());
|
|
||||||
Ok(())
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
assert_eq!(parts, &[
|
|
||||||
InstructionPart::opcode("mov", opcode),
|
|
||||||
InstructionPart::opaque("rax"),
|
|
||||||
InstructionPart::basic(","),
|
|
||||||
InstructionPart::basic(" "),
|
|
||||||
InstructionPart::basic("["),
|
|
||||||
InstructionPart::reloc(),
|
|
||||||
InstructionPart::basic("]"),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_process_x86_64_instruction_with_reloc_2() {
|
|
||||||
let arch = ArchX86 { arch: Architecture::X86_64, endianness: object::Endianness::Little };
|
|
||||||
let code = [0xe8, 0x00, 0x00, 0x00, 0x00];
|
|
||||||
let opcode = iced_x86::Mnemonic::Call as u16;
|
|
||||||
let mut parts = Vec::new();
|
|
||||||
arch.display_instruction(
|
|
||||||
ResolvedInstructionRef {
|
|
||||||
ins_ref: InstructionRef { address: 0x1234, size: 5, opcode, branch_dest: None },
|
|
||||||
code: &code,
|
|
||||||
relocation: Some(ResolvedRelocation {
|
|
||||||
relocation: &Relocation {
|
|
||||||
flags: RelocationFlags::Coff(pe::IMAGE_REL_AMD64_REL32),
|
|
||||||
address: 0x1234 + 1,
|
|
||||||
target_symbol: 0,
|
|
||||||
addend: 0,
|
|
||||||
},
|
|
||||||
symbol: &Default::default(),
|
|
||||||
}),
|
|
||||||
..Default::default()
|
|
||||||
},
|
|
||||||
&DiffObjConfig::default(),
|
|
||||||
&mut |part| {
|
|
||||||
parts.push(part.into_static());
|
|
||||||
Ok(())
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.unwrap();
|
|
||||||
assert_eq!(parts, &[InstructionPart::opcode("call", opcode), InstructionPart::reloc()]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -434,7 +434,6 @@ impl From<LegacyReportItem> for ReportItem {
|
|||||||
demangled_name: value.demangled_name,
|
demangled_name: value.demangled_name,
|
||||||
virtual_address: value.address,
|
virtual_address: value.address,
|
||||||
}),
|
}),
|
||||||
address: None,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,15 +14,15 @@ use super::{
|
|||||||
};
|
};
|
||||||
use crate::obj::{
|
use crate::obj::{
|
||||||
InstructionArg, InstructionArgValue, InstructionRef, Object, ResolvedInstructionRef,
|
InstructionArg, InstructionArgValue, InstructionRef, Object, ResolvedInstructionRef,
|
||||||
ResolvedRelocation, ResolvedSymbol, SymbolFlag, SymbolKind,
|
ResolvedRelocation, ScannedInstruction, SymbolFlag, SymbolKind,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn no_diff_code(
|
pub fn no_diff_code(
|
||||||
obj: &Object,
|
obj: &Object,
|
||||||
symbol_index: usize,
|
symbol_idx: usize,
|
||||||
diff_config: &DiffObjConfig,
|
diff_config: &DiffObjConfig,
|
||||||
) -> Result<SymbolDiff> {
|
) -> Result<SymbolDiff> {
|
||||||
let symbol = &obj.symbols[symbol_index];
|
let symbol = &obj.symbols[symbol_idx];
|
||||||
let section_index = symbol.section.ok_or_else(|| anyhow!("Missing section for symbol"))?;
|
let section_index = symbol.section.ok_or_else(|| anyhow!("Missing section for symbol"))?;
|
||||||
let section = &obj.sections[section_index];
|
let section = &obj.sections[section_index];
|
||||||
let data = section.data_range(symbol.address, symbol.size as usize).ok_or_else(|| {
|
let data = section.data_range(symbol.address, symbol.size as usize).ok_or_else(|| {
|
||||||
@ -32,15 +32,13 @@ pub fn no_diff_code(
|
|||||||
symbol.address + symbol.size
|
symbol.address + symbol.size
|
||||||
)
|
)
|
||||||
})?;
|
})?;
|
||||||
let ops = obj.arch.scan_instructions(
|
let ops = obj.arch.scan_instructions(symbol.address, data, section_index, diff_config)?;
|
||||||
ResolvedSymbol { obj, symbol_index, symbol, section_index, section, data },
|
|
||||||
diff_config,
|
|
||||||
)?;
|
|
||||||
let mut instruction_rows = Vec::<InstructionDiffRow>::new();
|
let mut instruction_rows = Vec::<InstructionDiffRow>::new();
|
||||||
for i in &ops {
|
for i in &ops {
|
||||||
instruction_rows.push(InstructionDiffRow { ins_ref: Some(*i), ..Default::default() });
|
instruction_rows
|
||||||
|
.push(InstructionDiffRow { ins_ref: Some(i.ins_ref), ..Default::default() });
|
||||||
}
|
}
|
||||||
resolve_branches(&ops, &mut instruction_rows);
|
resolve_branches(obj, section_index, &ops, &mut instruction_rows);
|
||||||
Ok(SymbolDiff { target_symbol: None, match_percent: None, diff_score: None, instruction_rows })
|
Ok(SymbolDiff { target_symbol: None, match_percent: None, diff_score: None, instruction_rows })
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,30 +86,20 @@ pub fn diff_code(
|
|||||||
let left_section_idx = left_symbol.section.unwrap();
|
let left_section_idx = left_symbol.section.unwrap();
|
||||||
let right_section_idx = right_symbol.section.unwrap();
|
let right_section_idx = right_symbol.section.unwrap();
|
||||||
let left_ops = left_obj.arch.scan_instructions(
|
let left_ops = left_obj.arch.scan_instructions(
|
||||||
ResolvedSymbol {
|
left_symbol.address,
|
||||||
obj: left_obj,
|
left_data,
|
||||||
symbol_index: left_symbol_idx,
|
left_section_idx,
|
||||||
symbol: left_symbol,
|
|
||||||
section_index: left_section_idx,
|
|
||||||
section: left_section,
|
|
||||||
data: left_data,
|
|
||||||
},
|
|
||||||
diff_config,
|
diff_config,
|
||||||
)?;
|
)?;
|
||||||
let right_ops = right_obj.arch.scan_instructions(
|
let right_ops = right_obj.arch.scan_instructions(
|
||||||
ResolvedSymbol {
|
right_symbol.address,
|
||||||
obj: right_obj,
|
right_data,
|
||||||
symbol_index: right_symbol_idx,
|
right_section_idx,
|
||||||
symbol: right_symbol,
|
|
||||||
section_index: right_section_idx,
|
|
||||||
section: right_section,
|
|
||||||
data: right_data,
|
|
||||||
},
|
|
||||||
diff_config,
|
diff_config,
|
||||||
)?;
|
)?;
|
||||||
let (mut left_rows, mut right_rows) = diff_instructions(&left_ops, &right_ops)?;
|
let (mut left_rows, mut right_rows) = diff_instructions(&left_ops, &right_ops)?;
|
||||||
resolve_branches(&left_ops, &mut left_rows);
|
resolve_branches(left_obj, left_section_idx, &left_ops, &mut left_rows);
|
||||||
resolve_branches(&right_ops, &mut right_rows);
|
resolve_branches(right_obj, right_section_idx, &right_ops, &mut right_rows);
|
||||||
|
|
||||||
let mut diff_state = InstructionDiffState::default();
|
let mut diff_state = InstructionDiffState::default();
|
||||||
for (left_row, right_row) in left_rows.iter_mut().zip(right_rows.iter_mut()) {
|
for (left_row, right_row) in left_rows.iter_mut().zip(right_rows.iter_mut()) {
|
||||||
@ -158,21 +146,21 @@ pub fn diff_code(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn diff_instructions(
|
fn diff_instructions(
|
||||||
left_insts: &[InstructionRef],
|
left_insts: &[ScannedInstruction],
|
||||||
right_insts: &[InstructionRef],
|
right_insts: &[ScannedInstruction],
|
||||||
) -> Result<(Vec<InstructionDiffRow>, Vec<InstructionDiffRow>)> {
|
) -> Result<(Vec<InstructionDiffRow>, Vec<InstructionDiffRow>)> {
|
||||||
let left_ops = left_insts.iter().map(|i| i.opcode).collect::<Vec<_>>();
|
let left_ops = left_insts.iter().map(|i| i.ins_ref.opcode).collect::<Vec<_>>();
|
||||||
let right_ops = right_insts.iter().map(|i| i.opcode).collect::<Vec<_>>();
|
let right_ops = right_insts.iter().map(|i| i.ins_ref.opcode).collect::<Vec<_>>();
|
||||||
let ops = similar::capture_diff_slices(similar::Algorithm::Patience, &left_ops, &right_ops);
|
let ops = similar::capture_diff_slices(similar::Algorithm::Patience, &left_ops, &right_ops);
|
||||||
if ops.is_empty() {
|
if ops.is_empty() {
|
||||||
ensure!(left_insts.len() == right_insts.len());
|
ensure!(left_insts.len() == right_insts.len());
|
||||||
let left_diff = left_insts
|
let left_diff = left_insts
|
||||||
.iter()
|
.iter()
|
||||||
.map(|i| InstructionDiffRow { ins_ref: Some(*i), ..Default::default() })
|
.map(|i| InstructionDiffRow { ins_ref: Some(i.ins_ref), ..Default::default() })
|
||||||
.collect();
|
.collect();
|
||||||
let right_diff = right_insts
|
let right_diff = right_insts
|
||||||
.iter()
|
.iter()
|
||||||
.map(|i| InstructionDiffRow { ins_ref: Some(*i), ..Default::default() })
|
.map(|i| InstructionDiffRow { ins_ref: Some(i.ins_ref), ..Default::default() })
|
||||||
.collect();
|
.collect();
|
||||||
return Ok((left_diff, right_diff));
|
return Ok((left_diff, right_diff));
|
||||||
}
|
}
|
||||||
@ -191,17 +179,14 @@ fn diff_instructions(
|
|||||||
for op in ops {
|
for op in ops {
|
||||||
let (_tag, left_range, right_range) = op.as_tag_tuple();
|
let (_tag, left_range, right_range) = op.as_tag_tuple();
|
||||||
let len = left_range.len().max(right_range.len());
|
let len = left_range.len().max(right_range.len());
|
||||||
left_diff.extend(
|
left_diff.extend(left_range.clone().map(|i| InstructionDiffRow {
|
||||||
left_range
|
ins_ref: Some(left_insts[i].ins_ref),
|
||||||
.clone()
|
|
||||||
.map(|i| InstructionDiffRow { ins_ref: Some(left_insts[i]), ..Default::default() }),
|
|
||||||
);
|
|
||||||
right_diff.extend(
|
|
||||||
right_range.clone().map(|i| InstructionDiffRow {
|
|
||||||
ins_ref: Some(right_insts[i]),
|
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}),
|
}));
|
||||||
);
|
right_diff.extend(right_range.clone().map(|i| InstructionDiffRow {
|
||||||
|
ins_ref: Some(right_insts[i].ins_ref),
|
||||||
|
..Default::default()
|
||||||
|
}));
|
||||||
if left_range.len() < len {
|
if left_range.len() < len {
|
||||||
left_diff.extend((left_range.len()..len).map(|_| InstructionDiffRow::default()));
|
left_diff.extend((left_range.len()..len).map(|_| InstructionDiffRow::default()));
|
||||||
}
|
}
|
||||||
@ -222,7 +207,13 @@ fn arg_to_string(arg: &InstructionArg, reloc: Option<ResolvedRelocation>) -> Str
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn resolve_branches(ops: &[InstructionRef], rows: &mut [InstructionDiffRow]) {
|
fn resolve_branches(
|
||||||
|
obj: &Object,
|
||||||
|
section_index: usize,
|
||||||
|
ops: &[ScannedInstruction],
|
||||||
|
rows: &mut [InstructionDiffRow],
|
||||||
|
) {
|
||||||
|
let section = &obj.sections[section_index];
|
||||||
let mut branch_idx = 0u32;
|
let mut branch_idx = 0u32;
|
||||||
// Map addresses to indices
|
// Map addresses to indices
|
||||||
let mut addr_map = BTreeMap::<u64, u32>::new();
|
let mut addr_map = BTreeMap::<u64, u32>::new();
|
||||||
@ -236,7 +227,17 @@ fn resolve_branches(ops: &[InstructionRef], rows: &mut [InstructionDiffRow]) {
|
|||||||
for ((i, ins_diff), ins) in
|
for ((i, ins_diff), ins) in
|
||||||
rows.iter_mut().enumerate().filter(|(_, row)| row.ins_ref.is_some()).zip(ops)
|
rows.iter_mut().enumerate().filter(|(_, row)| row.ins_ref.is_some()).zip(ops)
|
||||||
{
|
{
|
||||||
if let Some(ins_idx) = ins.branch_dest.and_then(|a| addr_map.get(&a).copied()) {
|
let branch_dest = if let Some(resolved) = section.relocation_at(obj, ins.ins_ref) {
|
||||||
|
if resolved.symbol.section == Some(section_index) {
|
||||||
|
// If the relocation target is in the same section, use it as the branch destination
|
||||||
|
resolved.symbol.address.checked_add_signed(resolved.relocation.addend)
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ins.branch_dest
|
||||||
|
};
|
||||||
|
if let Some(ins_idx) = branch_dest.and_then(|a| addr_map.get(&a).copied()) {
|
||||||
match branches.entry(ins_idx) {
|
match branches.entry(ins_idx) {
|
||||||
btree_map::Entry::Vacant(e) => {
|
btree_map::Entry::Vacant(e) => {
|
||||||
ins_diff.branch_to = Some(InstructionBranchTo { ins_idx, branch_idx });
|
ins_diff.branch_to = Some(InstructionBranchTo { ins_idx, branch_idx });
|
||||||
@ -321,15 +322,15 @@ fn reloc_eq(
|
|||||||
|| address_eq(left_reloc, right_reloc))
|
|| address_eq(left_reloc, right_reloc))
|
||||||
&& (diff_config.function_reloc_diffs == FunctionRelocDiffs::NameAddress
|
&& (diff_config.function_reloc_diffs == FunctionRelocDiffs::NameAddress
|
||||||
|| left_reloc.symbol.kind != SymbolKind::Object
|
|| left_reloc.symbol.kind != SymbolKind::Object
|
||||||
|| right_reloc.symbol.size == 0 // Likely a pool symbol like ...data, don't treat this as a diff
|
|
||||||
|| display_ins_data_literals(left_obj, left_ins)
|
|| display_ins_data_literals(left_obj, left_ins)
|
||||||
== display_ins_data_literals(right_obj, right_ins))
|
== display_ins_data_literals(right_obj, right_ins))
|
||||||
}
|
}
|
||||||
|
(Some(_), None) => false,
|
||||||
(None, Some(_)) => {
|
(None, Some(_)) => {
|
||||||
// Match if possibly stripped weak symbol
|
// Match if possibly stripped weak symbol
|
||||||
symbol_name_addend_matches && right_reloc.symbol.flags.contains(SymbolFlag::Weak)
|
symbol_name_addend_matches && right_reloc.symbol.flags.contains(SymbolFlag::Weak)
|
||||||
}
|
}
|
||||||
(Some(_), None) | (None, None) => symbol_name_addend_matches,
|
(None, None) => symbol_name_addend_matches,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,11 +53,12 @@ fn reloc_eq(
|
|||||||
section_name_eq(left_obj, right_obj, sl, sr)
|
section_name_eq(left_obj, right_obj, sl, sr)
|
||||||
&& (symbol_name_addend_matches || address_eq(left, right))
|
&& (symbol_name_addend_matches || address_eq(left, right))
|
||||||
}
|
}
|
||||||
|
(Some(_), None) => false,
|
||||||
(None, Some(_)) => {
|
(None, Some(_)) => {
|
||||||
// Match if possibly stripped weak symbol
|
// Match if possibly stripped weak symbol
|
||||||
symbol_name_addend_matches && right.symbol.flags.contains(SymbolFlag::Weak)
|
symbol_name_addend_matches && right.symbol.flags.contains(SymbolFlag::Weak)
|
||||||
}
|
}
|
||||||
(Some(_), None) | (None, None) => symbol_name_addend_matches,
|
(None, None) => symbol_name_addend_matches,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,6 +274,7 @@ pub fn diff_data_section(
|
|||||||
// We only do this when all relocations on the left side match.
|
// We only do this when all relocations on the left side match.
|
||||||
if left_section_diff.match_percent.unwrap_or(-1.0) < match_percent {
|
if left_section_diff.match_percent.unwrap_or(-1.0) < match_percent {
|
||||||
left_section_diff.match_percent = Some(match_percent);
|
left_section_diff.match_percent = Some(match_percent);
|
||||||
|
right_section_diff.match_percent = Some(match_percent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok((left_section_diff, right_section_diff))
|
Ok((left_section_diff, right_section_diff))
|
||||||
@ -411,7 +413,7 @@ pub fn diff_generic_section(
|
|||||||
};
|
};
|
||||||
Ok((
|
Ok((
|
||||||
SectionDiff { match_percent: Some(match_percent), data_diff: vec![], reloc_diff: vec![] },
|
SectionDiff { match_percent: Some(match_percent), data_diff: vec![], reloc_diff: vec![] },
|
||||||
SectionDiff { match_percent: None, data_diff: vec![], reloc_diff: vec![] },
|
SectionDiff { match_percent: Some(match_percent), data_diff: vec![], reloc_diff: vec![] },
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -452,7 +454,7 @@ pub fn diff_bss_section(
|
|||||||
|
|
||||||
Ok((
|
Ok((
|
||||||
SectionDiff { match_percent: Some(match_percent), data_diff: vec![], reloc_diff: vec![] },
|
SectionDiff { match_percent: Some(match_percent), data_diff: vec![], reloc_diff: vec![] },
|
||||||
SectionDiff { match_percent: None, data_diff: vec![], reloc_diff: vec![] },
|
SectionDiff { match_percent: Some(match_percent), data_diff: vec![], reloc_diff: vec![] },
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ impl<'a> DiffTextSegment<'a> {
|
|||||||
const EOL_SEGMENT: DiffTextSegment<'static> =
|
const EOL_SEGMENT: DiffTextSegment<'static> =
|
||||||
DiffTextSegment { text: DiffText::Eol, color: DiffTextColor::Normal, pad_to: 0 };
|
DiffTextSegment { text: DiffText::Eol, color: DiffTextColor::Normal, pad_to: 0 };
|
||||||
|
|
||||||
#[derive(Debug, Default, Clone)]
|
#[derive(Debug, Default, Clone, PartialEq, Eq)]
|
||||||
pub enum HighlightKind {
|
pub enum HighlightKind {
|
||||||
#[default]
|
#[default]
|
||||||
None,
|
None,
|
||||||
@ -205,18 +205,16 @@ pub fn display_row(
|
|||||||
InstructionPart::Arg(arg) => {
|
InstructionPart::Arg(arg) => {
|
||||||
let diff_index = ins_row.arg_diff.get(arg_idx).copied().unwrap_or_default();
|
let diff_index = ins_row.arg_diff.get(arg_idx).copied().unwrap_or_default();
|
||||||
arg_idx += 1;
|
arg_idx += 1;
|
||||||
if arg == InstructionArg::Reloc {
|
match arg {
|
||||||
displayed_relocation = true;
|
InstructionArg::Value(value) => cb(DiffTextSegment {
|
||||||
}
|
|
||||||
match (arg, resolved.ins_ref.branch_dest) {
|
|
||||||
(InstructionArg::Value(value), _) => cb(DiffTextSegment {
|
|
||||||
text: DiffText::Argument(value),
|
text: DiffText::Argument(value),
|
||||||
color: diff_index
|
color: diff_index
|
||||||
.get()
|
.get()
|
||||||
.map_or(base_color, |i| DiffTextColor::Rotating(i as u8)),
|
.map_or(base_color, |i| DiffTextColor::Rotating(i as u8)),
|
||||||
pad_to: 0,
|
pad_to: 0,
|
||||||
}),
|
}),
|
||||||
(InstructionArg::Reloc, None) => {
|
InstructionArg::Reloc => {
|
||||||
|
displayed_relocation = true;
|
||||||
let resolved = resolved.relocation.unwrap();
|
let resolved = resolved.relocation.unwrap();
|
||||||
let color = diff_index
|
let color = diff_index
|
||||||
.get()
|
.get()
|
||||||
@ -235,9 +233,7 @@ pub fn display_row(
|
|||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
(InstructionArg::BranchDest(dest), _) |
|
InstructionArg::BranchDest(dest) => {
|
||||||
// If the relocation was resolved to a branch destination, emit that instead.
|
|
||||||
(InstructionArg::Reloc, Some(dest)) => {
|
|
||||||
if let Some(addr) = dest.checked_sub(resolved.symbol.address) {
|
if let Some(addr) = dest.checked_sub(resolved.symbol.address) {
|
||||||
cb(DiffTextSegment {
|
cb(DiffTextSegment {
|
||||||
text: DiffText::BranchDest(addr),
|
text: DiffText::BranchDest(addr),
|
||||||
@ -288,18 +284,6 @@ pub fn display_row(
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PartialEq<HighlightKind> for HighlightKind {
|
|
||||||
fn eq(&self, other: &HighlightKind) -> bool {
|
|
||||||
match (self, other) {
|
|
||||||
(HighlightKind::Opcode(a), HighlightKind::Opcode(b)) => a == b,
|
|
||||||
(HighlightKind::Argument(a), HighlightKind::Argument(b)) => a.loose_eq(b),
|
|
||||||
(HighlightKind::Symbol(a), HighlightKind::Symbol(b)) => a == b,
|
|
||||||
(HighlightKind::Address(a), HighlightKind::Address(b)) => a == b,
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl PartialEq<DiffText<'_>> for HighlightKind {
|
impl PartialEq<DiffText<'_>> for HighlightKind {
|
||||||
fn eq(&self, other: &DiffText) -> bool {
|
fn eq(&self, other: &DiffText) -> bool {
|
||||||
match (self, other) {
|
match (self, other) {
|
||||||
@ -341,14 +325,10 @@ pub enum SymbolNavigationKind {
|
|||||||
Extab,
|
Extab,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Default, Eq, PartialEq)]
|
|
||||||
pub enum HoverItemColor {
|
pub enum HoverItemColor {
|
||||||
#[default]
|
|
||||||
Normal, // Gray
|
Normal, // Gray
|
||||||
Emphasized, // White
|
Emphasized, // White
|
||||||
Special, // Blue
|
Special, // Blue
|
||||||
Delete, // Red
|
|
||||||
Insert, // Green
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum HoverItem {
|
pub enum HoverItem {
|
||||||
@ -375,12 +355,7 @@ pub fn symbol_context(obj: &Object, symbol_index: usize) -> Vec<ContextItem> {
|
|||||||
out
|
out
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn symbol_hover(
|
pub fn symbol_hover(obj: &Object, symbol_index: usize, addend: i64) -> Vec<HoverItem> {
|
||||||
obj: &Object,
|
|
||||||
symbol_index: usize,
|
|
||||||
addend: i64,
|
|
||||||
override_color: Option<HoverItemColor>,
|
|
||||||
) -> Vec<HoverItem> {
|
|
||||||
let symbol = &obj.symbols[symbol_index];
|
let symbol = &obj.symbols[symbol_index];
|
||||||
let addend_str = match addend.cmp(&0i64) {
|
let addend_str = match addend.cmp(&0i64) {
|
||||||
Ordering::Greater => format!("+{:x}", addend),
|
Ordering::Greater => format!("+{:x}", addend),
|
||||||
@ -391,51 +366,51 @@ pub fn symbol_hover(
|
|||||||
out.push(HoverItem::Text {
|
out.push(HoverItem::Text {
|
||||||
label: "Name".into(),
|
label: "Name".into(),
|
||||||
value: format!("{}{}", symbol.name, addend_str),
|
value: format!("{}{}", symbol.name, addend_str),
|
||||||
color: override_color.clone().unwrap_or_default(),
|
color: HoverItemColor::Normal,
|
||||||
});
|
});
|
||||||
if let Some(demangled_name) = &symbol.demangled_name {
|
if let Some(demangled_name) = &symbol.demangled_name {
|
||||||
out.push(HoverItem::Text {
|
out.push(HoverItem::Text {
|
||||||
label: "Demangled".into(),
|
label: "Demangled".into(),
|
||||||
value: demangled_name.into(),
|
value: demangled_name.into(),
|
||||||
color: override_color.clone().unwrap_or_default(),
|
color: HoverItemColor::Normal,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if let Some(section) = symbol.section {
|
if let Some(section) = symbol.section {
|
||||||
out.push(HoverItem::Text {
|
out.push(HoverItem::Text {
|
||||||
label: "Section".into(),
|
label: "Section".into(),
|
||||||
value: obj.sections[section].name.clone(),
|
value: obj.sections[section].name.clone(),
|
||||||
color: override_color.clone().unwrap_or_default(),
|
color: HoverItemColor::Normal,
|
||||||
});
|
});
|
||||||
out.push(HoverItem::Text {
|
out.push(HoverItem::Text {
|
||||||
label: "Address".into(),
|
label: "Address".into(),
|
||||||
value: format!("{:x}{}", symbol.address, addend_str),
|
value: format!("{:x}{}", symbol.address, addend_str),
|
||||||
color: override_color.clone().unwrap_or_default(),
|
color: HoverItemColor::Normal,
|
||||||
});
|
});
|
||||||
if symbol.flags.contains(SymbolFlag::SizeInferred) {
|
if symbol.flags.contains(SymbolFlag::SizeInferred) {
|
||||||
out.push(HoverItem::Text {
|
out.push(HoverItem::Text {
|
||||||
label: "Size".into(),
|
label: "Size".into(),
|
||||||
value: format!("{:x} (inferred)", symbol.size),
|
value: format!("{:x} (inferred)", symbol.size),
|
||||||
color: override_color.clone().unwrap_or_default(),
|
color: HoverItemColor::Normal,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
out.push(HoverItem::Text {
|
out.push(HoverItem::Text {
|
||||||
label: "Size".into(),
|
label: "Size".into(),
|
||||||
value: format!("{:x}", symbol.size),
|
value: format!("{:x}", symbol.size),
|
||||||
color: override_color.clone().unwrap_or_default(),
|
color: HoverItemColor::Normal,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if let Some(align) = symbol.align {
|
if let Some(align) = symbol.align {
|
||||||
out.push(HoverItem::Text {
|
out.push(HoverItem::Text {
|
||||||
label: "Alignment".into(),
|
label: "Alignment".into(),
|
||||||
value: align.get().to_string(),
|
value: align.get().to_string(),
|
||||||
color: override_color.clone().unwrap_or_default(),
|
color: HoverItemColor::Normal,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if let Some(address) = symbol.virtual_address {
|
if let Some(address) = symbol.virtual_address {
|
||||||
out.push(HoverItem::Text {
|
out.push(HoverItem::Text {
|
||||||
label: "Virtual address".into(),
|
label: "Virtual address".into(),
|
||||||
value: format!("{:x}", address),
|
value: format!("{:x}", address),
|
||||||
color: override_color.clone().unwrap_or(HoverItemColor::Special),
|
color: HoverItemColor::Special,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -460,39 +435,30 @@ pub fn relocation_context(
|
|||||||
let literals = display_ins_data_literals(obj, ins);
|
let literals = display_ins_data_literals(obj, ins);
|
||||||
if !literals.is_empty() {
|
if !literals.is_empty() {
|
||||||
out.push(ContextItem::Separator);
|
out.push(ContextItem::Separator);
|
||||||
for (literal, label_override) in literals {
|
for literal in literals {
|
||||||
out.push(ContextItem::Copy { value: literal, label: label_override });
|
out.push(ContextItem::Copy { value: literal, label: None });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
out
|
out
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn relocation_hover(
|
pub fn relocation_hover(obj: &Object, reloc: ResolvedRelocation) -> Vec<HoverItem> {
|
||||||
obj: &Object,
|
|
||||||
reloc: ResolvedRelocation,
|
|
||||||
override_color: Option<HoverItemColor>,
|
|
||||||
) -> Vec<HoverItem> {
|
|
||||||
let mut out = Vec::new();
|
let mut out = Vec::new();
|
||||||
if let Some(name) = obj.arch.reloc_name(reloc.relocation.flags) {
|
if let Some(name) = obj.arch.reloc_name(reloc.relocation.flags) {
|
||||||
out.push(HoverItem::Text {
|
out.push(HoverItem::Text {
|
||||||
label: "Relocation".into(),
|
label: "Relocation".into(),
|
||||||
value: name.to_string(),
|
value: name.to_string(),
|
||||||
color: override_color.clone().unwrap_or_default(),
|
color: HoverItemColor::Normal,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
out.push(HoverItem::Text {
|
out.push(HoverItem::Text {
|
||||||
label: "Relocation".into(),
|
label: "Relocation".into(),
|
||||||
value: format!("<{:?}>", reloc.relocation.flags),
|
value: format!("<{:?}>", reloc.relocation.flags),
|
||||||
color: override_color.clone().unwrap_or_default(),
|
color: HoverItemColor::Normal,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
out.append(&mut symbol_hover(
|
out.append(&mut symbol_hover(obj, reloc.relocation.target_symbol, reloc.relocation.addend));
|
||||||
obj,
|
|
||||||
reloc.relocation.target_symbol,
|
|
||||||
reloc.relocation.addend,
|
|
||||||
override_color,
|
|
||||||
));
|
|
||||||
out
|
out
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -579,15 +545,14 @@ pub fn instruction_hover(
|
|||||||
}
|
}
|
||||||
if let Some(reloc) = resolved.relocation {
|
if let Some(reloc) = resolved.relocation {
|
||||||
out.push(HoverItem::Separator);
|
out.push(HoverItem::Separator);
|
||||||
out.append(&mut relocation_hover(obj, reloc, None));
|
out.append(&mut relocation_hover(obj, reloc));
|
||||||
let bytes = obj.symbol_data(reloc.relocation.target_symbol).unwrap_or(&[]);
|
if let Some(ty) = obj.arch.guess_data_type(resolved) {
|
||||||
if let Some(ty) = obj.arch.guess_data_type(resolved, bytes) {
|
|
||||||
let literals = display_ins_data_literals(obj, resolved);
|
let literals = display_ins_data_literals(obj, resolved);
|
||||||
if !literals.is_empty() {
|
if !literals.is_empty() {
|
||||||
out.push(HoverItem::Separator);
|
out.push(HoverItem::Separator);
|
||||||
for (literal, label_override) in literals {
|
for literal in literals {
|
||||||
out.push(HoverItem::Text {
|
out.push(HoverItem::Text {
|
||||||
label: label_override.unwrap_or_else(|| format!("{}", ty)),
|
label: format!("{}", ty),
|
||||||
value: literal,
|
value: literal,
|
||||||
color: HoverItemColor::Normal,
|
color: HoverItemColor::Normal,
|
||||||
});
|
});
|
||||||
@ -700,25 +665,24 @@ pub fn display_sections(
|
|||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
if let Some(section_idx) = section_idx {
|
if let Some(section_idx) = section_idx {
|
||||||
let section = &obj.sections[section_idx];
|
let section = &obj.sections[section_idx];
|
||||||
if section.kind == SectionKind::Unknown {
|
if section.kind == SectionKind::Unknown || section.flags.contains(SectionFlag::Hidden) {
|
||||||
// Skip unknown and hidden sections
|
// Skip unknown and hidden sections
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let section_diff = &diff.sections[section_idx];
|
let section_diff = &diff.sections[section_idx];
|
||||||
let reverse_fn_order = section.kind == SectionKind::Code && reverse_fn_order;
|
if section.kind == SectionKind::Code && reverse_fn_order {
|
||||||
symbols.sort_by(|a, b| {
|
symbols.sort_by(|a, b| {
|
||||||
let a = &obj.symbols[a.symbol];
|
let a_symbol = &obj.symbols[a.symbol];
|
||||||
let b = &obj.symbols[b.symbol];
|
let b_symbol = &obj.symbols[b.symbol];
|
||||||
section_symbol_sort(a, b)
|
symbol_sort_reverse(a_symbol, b_symbol)
|
||||||
.then_with(|| {
|
|
||||||
if reverse_fn_order {
|
|
||||||
b.address.cmp(&a.address)
|
|
||||||
} else {
|
|
||||||
a.address.cmp(&b.address)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.then_with(|| a.size.cmp(&b.size))
|
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
symbols.sort_by(|a, b| {
|
||||||
|
let a_symbol = &obj.symbols[a.symbol];
|
||||||
|
let b_symbol = &obj.symbols[b.symbol];
|
||||||
|
symbol_sort(a_symbol, b_symbol)
|
||||||
|
});
|
||||||
|
}
|
||||||
sections.push(SectionDisplay {
|
sections.push(SectionDisplay {
|
||||||
id: section.id.clone(),
|
id: section.id.clone(),
|
||||||
name: if section.flags.contains(SectionFlag::Combined) {
|
name: if section.flags.contains(SectionFlag::Combined) {
|
||||||
@ -756,6 +720,14 @@ fn section_symbol_sort(a: &Symbol, b: &Symbol) -> Ordering {
|
|||||||
Ordering::Equal
|
Ordering::Equal
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn symbol_sort(a: &Symbol, b: &Symbol) -> Ordering {
|
||||||
|
section_symbol_sort(a, b).then(a.address.cmp(&b.address)).then(a.size.cmp(&b.size))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn symbol_sort_reverse(a: &Symbol, b: &Symbol) -> Ordering {
|
||||||
|
section_symbol_sort(a, b).then(b.address.cmp(&a.address)).then(b.size.cmp(&a.size))
|
||||||
|
}
|
||||||
|
|
||||||
pub fn display_ins_data_labels(obj: &Object, resolved: ResolvedInstructionRef) -> Vec<String> {
|
pub fn display_ins_data_labels(obj: &Object, resolved: ResolvedInstructionRef) -> Vec<String> {
|
||||||
let Some(reloc) = resolved.relocation else {
|
let Some(reloc) = resolved.relocation else {
|
||||||
return Vec::new();
|
return Vec::new();
|
||||||
@ -768,15 +740,12 @@ pub fn display_ins_data_labels(obj: &Object, resolved: ResolvedInstructionRef) -
|
|||||||
};
|
};
|
||||||
let bytes = &data[reloc.relocation.addend as usize..];
|
let bytes = &data[reloc.relocation.addend as usize..];
|
||||||
obj.arch
|
obj.arch
|
||||||
.guess_data_type(resolved, bytes)
|
.guess_data_type(resolved)
|
||||||
.map(|ty| ty.display_labels(obj.endianness, bytes))
|
.map(|ty| ty.display_labels(obj.endianness, bytes))
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn display_ins_data_literals(
|
pub fn display_ins_data_literals(obj: &Object, resolved: ResolvedInstructionRef) -> Vec<String> {
|
||||||
obj: &Object,
|
|
||||||
resolved: ResolvedInstructionRef,
|
|
||||||
) -> Vec<(String, Option<String>)> {
|
|
||||||
let Some(reloc) = resolved.relocation else {
|
let Some(reloc) = resolved.relocation else {
|
||||||
return Vec::new();
|
return Vec::new();
|
||||||
};
|
};
|
||||||
@ -788,7 +757,7 @@ pub fn display_ins_data_literals(
|
|||||||
};
|
};
|
||||||
let bytes = &data[reloc.relocation.addend as usize..];
|
let bytes = &data[reloc.relocation.addend as usize..];
|
||||||
obj.arch
|
obj.arch
|
||||||
.guess_data_type(resolved, bytes)
|
.guess_data_type(resolved)
|
||||||
.map(|ty| ty.display_literals(obj.endianness, bytes))
|
.map(|ty| ty.display_literals(obj.endianness, bytes))
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
}
|
}
|
||||||
|
@ -341,25 +341,11 @@ pub fn diff_objs(
|
|||||||
if let (Some((right_obj, right_out)), Some((left_obj, left_out))) =
|
if let (Some((right_obj, right_out)), Some((left_obj, left_out))) =
|
||||||
(right.as_mut(), left.as_mut())
|
(right.as_mut(), left.as_mut())
|
||||||
{
|
{
|
||||||
if let Some(right_name) = mapping_config.selecting_left.as_deref() {
|
if let Some(right_name) = &mapping_config.selecting_left {
|
||||||
generate_mapping_symbols(
|
generate_mapping_symbols(right_obj, right_name, left_obj, left_out, diff_config)?;
|
||||||
left_obj,
|
|
||||||
left_out,
|
|
||||||
right_obj,
|
|
||||||
right_out,
|
|
||||||
MappingSymbol::Right(right_name),
|
|
||||||
diff_config,
|
|
||||||
)?;
|
|
||||||
}
|
}
|
||||||
if let Some(left_name) = mapping_config.selecting_right.as_deref() {
|
if let Some(left_name) = &mapping_config.selecting_right {
|
||||||
generate_mapping_symbols(
|
generate_mapping_symbols(left_obj, left_name, right_obj, right_out, diff_config)?;
|
||||||
left_obj,
|
|
||||||
left_out,
|
|
||||||
right_obj,
|
|
||||||
right_out,
|
|
||||||
MappingSymbol::Left(left_name),
|
|
||||||
diff_config,
|
|
||||||
)?;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -370,28 +356,17 @@ pub fn diff_objs(
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy)]
|
|
||||||
enum MappingSymbol<'a> {
|
|
||||||
Left(&'a str),
|
|
||||||
Right(&'a str),
|
|
||||||
}
|
|
||||||
|
|
||||||
/// When we're selecting a symbol to use as a comparison, we'll create comparisons for all
|
/// When we're selecting a symbol to use as a comparison, we'll create comparisons for all
|
||||||
/// symbols in the other object that match the selected symbol's section and kind. This allows
|
/// symbols in the other object that match the selected symbol's section and kind. This allows
|
||||||
/// us to display match percentages for all symbols in the other object that could be selected.
|
/// us to display match percentages for all symbols in the other object that could be selected.
|
||||||
fn generate_mapping_symbols(
|
fn generate_mapping_symbols(
|
||||||
left_obj: &Object,
|
base_obj: &Object,
|
||||||
left_out: &mut ObjectDiff,
|
base_name: &str,
|
||||||
right_obj: &Object,
|
target_obj: &Object,
|
||||||
right_out: &mut ObjectDiff,
|
target_out: &mut ObjectDiff,
|
||||||
mapping_symbol: MappingSymbol,
|
|
||||||
config: &DiffObjConfig,
|
config: &DiffObjConfig,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
let (base_obj, base_name, target_obj) = match mapping_symbol {
|
let Some(base_symbol_ref) = symbol_ref_by_name(base_obj, base_name) else {
|
||||||
MappingSymbol::Left(name) => (left_obj, name, right_obj),
|
|
||||||
MappingSymbol::Right(name) => (right_obj, name, left_obj),
|
|
||||||
};
|
|
||||||
let Some(base_symbol_ref) = base_obj.symbol_by_name(base_name) else {
|
|
||||||
return Ok(());
|
return Ok(());
|
||||||
};
|
};
|
||||||
let base_section_kind = symbol_section_kind(base_obj, &base_obj.symbols[base_symbol_ref]);
|
let base_section_kind = symbol_section_kind(base_obj, &base_obj.symbols[base_symbol_ref]);
|
||||||
@ -402,30 +377,32 @@ fn generate_mapping_symbols(
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let (left_symbol_idx, right_symbol_idx) = match mapping_symbol {
|
match base_section_kind {
|
||||||
MappingSymbol::Left(_) => (base_symbol_ref, target_symbol_index),
|
|
||||||
MappingSymbol::Right(_) => (target_symbol_index, base_symbol_ref),
|
|
||||||
};
|
|
||||||
let (left_diff, right_diff) = match base_section_kind {
|
|
||||||
SectionKind::Code => {
|
SectionKind::Code => {
|
||||||
diff_code(left_obj, right_obj, left_symbol_idx, right_symbol_idx, config)
|
let (left_diff, _right_diff) =
|
||||||
|
diff_code(target_obj, base_obj, target_symbol_index, base_symbol_ref, config)?;
|
||||||
|
target_out.mapping_symbols.push(MappingSymbolDiff {
|
||||||
|
symbol_index: target_symbol_index,
|
||||||
|
symbol_diff: left_diff,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
SectionKind::Data => {
|
SectionKind::Data => {
|
||||||
diff_data_symbol(left_obj, right_obj, left_symbol_idx, right_symbol_idx)
|
let (left_diff, _right_diff) =
|
||||||
|
diff_data_symbol(target_obj, base_obj, target_symbol_index, base_symbol_ref)?;
|
||||||
|
target_out.mapping_symbols.push(MappingSymbolDiff {
|
||||||
|
symbol_index: target_symbol_index,
|
||||||
|
symbol_diff: left_diff,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
SectionKind::Bss | SectionKind::Common => {
|
SectionKind::Bss | SectionKind::Common => {
|
||||||
diff_bss_symbol(left_obj, right_obj, left_symbol_idx, right_symbol_idx)
|
let (left_diff, _right_diff) =
|
||||||
|
diff_bss_symbol(target_obj, base_obj, target_symbol_index, base_symbol_ref)?;
|
||||||
|
target_out.mapping_symbols.push(MappingSymbolDiff {
|
||||||
|
symbol_index: target_symbol_index,
|
||||||
|
symbol_diff: left_diff,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
SectionKind::Unknown => continue,
|
SectionKind::Unknown => {}
|
||||||
}?;
|
|
||||||
match mapping_symbol {
|
|
||||||
MappingSymbol::Left(_) => right_out.mapping_symbols.push(MappingSymbolDiff {
|
|
||||||
symbol_index: right_symbol_idx,
|
|
||||||
symbol_diff: right_diff,
|
|
||||||
}),
|
|
||||||
MappingSymbol::Right(_) => left_out
|
|
||||||
.mapping_symbols
|
|
||||||
.push(MappingSymbolDiff { symbol_index: left_symbol_idx, symbol_diff: left_diff }),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
@ -457,6 +434,10 @@ pub struct MappingConfig {
|
|||||||
pub selecting_right: Option<String>,
|
pub selecting_right: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn symbol_ref_by_name(obj: &Object, name: &str) -> Option<usize> {
|
||||||
|
obj.symbols.iter().position(|s| s.name == name)
|
||||||
|
}
|
||||||
|
|
||||||
fn apply_symbol_mappings(
|
fn apply_symbol_mappings(
|
||||||
left: &Object,
|
left: &Object,
|
||||||
right: &Object,
|
right: &Object,
|
||||||
@ -468,25 +449,25 @@ fn apply_symbol_mappings(
|
|||||||
// If we're selecting a symbol to use as a comparison, mark it as used
|
// If we're selecting a symbol to use as a comparison, mark it as used
|
||||||
// This ensures that we don't match it to another symbol at any point
|
// This ensures that we don't match it to another symbol at any point
|
||||||
if let Some(left_name) = &mapping_config.selecting_left {
|
if let Some(left_name) = &mapping_config.selecting_left {
|
||||||
if let Some(left_symbol) = left.symbol_by_name(left_name) {
|
if let Some(left_symbol) = symbol_ref_by_name(left, left_name) {
|
||||||
left_used.insert(left_symbol);
|
left_used.insert(left_symbol);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(right_name) = &mapping_config.selecting_right {
|
if let Some(right_name) = &mapping_config.selecting_right {
|
||||||
if let Some(right_symbol) = right.symbol_by_name(right_name) {
|
if let Some(right_symbol) = symbol_ref_by_name(right, right_name) {
|
||||||
right_used.insert(right_symbol);
|
right_used.insert(right_symbol);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply manual symbol mappings
|
// Apply manual symbol mappings
|
||||||
for (left_name, right_name) in &mapping_config.mappings {
|
for (left_name, right_name) in &mapping_config.mappings {
|
||||||
let Some(left_symbol_index) = left.symbol_by_name(left_name) else {
|
let Some(left_symbol_index) = symbol_ref_by_name(left, left_name) else {
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
if left_used.contains(&left_symbol_index) {
|
if left_used.contains(&left_symbol_index) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let Some(right_symbol_index) = right.symbol_by_name(right_name) else {
|
let Some(right_symbol_index) = symbol_ref_by_name(right, right_name) else {
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
if right_used.contains(&right_symbol_index) {
|
if right_used.contains(&right_symbol_index) {
|
||||||
@ -677,11 +658,7 @@ fn find_symbol(
|
|||||||
|
|
||||||
/// Find matching sections between each object.
|
/// Find matching sections between each object.
|
||||||
fn matching_sections(left: Option<&Object>, right: Option<&Object>) -> Result<Vec<SectionMatch>> {
|
fn matching_sections(left: Option<&Object>, right: Option<&Object>) -> Result<Vec<SectionMatch>> {
|
||||||
let mut matches = Vec::with_capacity(
|
let mut matches = Vec::new();
|
||||||
left.as_ref()
|
|
||||||
.map_or(0, |o| o.sections.len())
|
|
||||||
.max(right.as_ref().map_or(0, |o| o.sections.len())),
|
|
||||||
);
|
|
||||||
if let Some(left) = left {
|
if let Some(left) = left {
|
||||||
for (section_idx, section) in left.sections.iter().enumerate() {
|
for (section_idx, section) in left.sections.iter().enumerate() {
|
||||||
if section.kind == SectionKind::Unknown {
|
if section.kind == SectionKind::Unknown {
|
||||||
@ -689,7 +666,7 @@ fn matching_sections(left: Option<&Object>, right: Option<&Object>) -> Result<Ve
|
|||||||
}
|
}
|
||||||
matches.push(SectionMatch {
|
matches.push(SectionMatch {
|
||||||
left: Some(section_idx),
|
left: Some(section_idx),
|
||||||
right: find_section(right, §ion.name, section.kind, &matches),
|
right: find_section(right, §ion.name, section.kind),
|
||||||
section_kind: section.kind,
|
section_kind: section.kind,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -712,13 +689,6 @@ fn matching_sections(left: Option<&Object>, right: Option<&Object>) -> Result<Ve
|
|||||||
Ok(matches)
|
Ok(matches)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn find_section(
|
fn find_section(obj: Option<&Object>, name: &str, section_kind: SectionKind) -> Option<usize> {
|
||||||
obj: Option<&Object>,
|
obj?.sections.iter().position(|s| s.kind == section_kind && s.name == name)
|
||||||
name: &str,
|
|
||||||
section_kind: SectionKind,
|
|
||||||
matches: &[SectionMatch],
|
|
||||||
) -> Option<usize> {
|
|
||||||
obj?.sections.iter().enumerate().position(|(i, s)| {
|
|
||||||
s.kind == section_kind && s.name == name && !matches.iter().any(|m| m.right == Some(i))
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
@ -9,10 +9,7 @@ use alloc::{
|
|||||||
vec,
|
vec,
|
||||||
vec::Vec,
|
vec::Vec,
|
||||||
};
|
};
|
||||||
use core::{
|
use core::{fmt, num::NonZeroU32};
|
||||||
fmt,
|
|
||||||
num::{NonZeroU32, NonZeroU64},
|
|
||||||
};
|
|
||||||
|
|
||||||
use flagset::{FlagSet, flags};
|
use flagset::{FlagSet, flags};
|
||||||
|
|
||||||
@ -57,6 +54,7 @@ flags! {
|
|||||||
pub enum SectionFlag: u8 {
|
pub enum SectionFlag: u8 {
|
||||||
/// Section combined from multiple input sections
|
/// Section combined from multiple input sections
|
||||||
Combined,
|
Combined,
|
||||||
|
Hidden,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,7 +70,6 @@ pub struct Section {
|
|||||||
pub kind: SectionKind,
|
pub kind: SectionKind,
|
||||||
pub data: SectionData,
|
pub data: SectionData,
|
||||||
pub flags: SectionFlagSet,
|
pub flags: SectionFlagSet,
|
||||||
pub align: Option<NonZeroU64>,
|
|
||||||
pub relocations: Vec<Relocation>,
|
pub relocations: Vec<Relocation>,
|
||||||
/// Line number info (.line or .debug_line section)
|
/// Line number info (.line or .debug_line section)
|
||||||
pub line_info: BTreeMap<u64, u32>,
|
pub line_info: BTreeMap<u64, u32>,
|
||||||
@ -98,14 +95,14 @@ impl fmt::Debug for SectionData {
|
|||||||
|
|
||||||
impl Section {
|
impl Section {
|
||||||
pub fn data_range(&self, address: u64, size: usize) -> Option<&[u8]> {
|
pub fn data_range(&self, address: u64, size: usize) -> Option<&[u8]> {
|
||||||
let offset = address.checked_sub(self.address)?;
|
let start = self.address;
|
||||||
self.data.get(offset as usize..offset as usize + size)
|
let end = start + self.size;
|
||||||
|
if address >= start && address + size as u64 <= end {
|
||||||
|
let offset = (address - start) as usize;
|
||||||
|
Some(&self.data[offset..offset + size])
|
||||||
|
} else {
|
||||||
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
// The alignment to use when "Combine data/text sections" is enabled.
|
|
||||||
pub fn combined_alignment(&self) -> u64 {
|
|
||||||
const MIN_ALIGNMENT: u64 = 4;
|
|
||||||
self.align.map(|align| align.get().max(MIN_ALIGNMENT)).unwrap_or(MIN_ALIGNMENT)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn relocation_at<'obj>(
|
pub fn relocation_at<'obj>(
|
||||||
@ -118,7 +115,7 @@ impl Section {
|
|||||||
Err(i) => self
|
Err(i) => self
|
||||||
.relocations
|
.relocations
|
||||||
.get(i)
|
.get(i)
|
||||||
.filter(|r| r.address < ins_ref.address + ins_ref.size as u64),
|
.take_if(|r| r.address < ins_ref.address + ins_ref.size as u64),
|
||||||
}
|
}
|
||||||
.and_then(|relocation| {
|
.and_then(|relocation| {
|
||||||
let symbol = obj.symbols.get(relocation.target_symbol)?;
|
let symbol = obj.symbols.get(relocation.target_symbol)?;
|
||||||
@ -214,6 +211,11 @@ pub struct InstructionRef {
|
|||||||
pub address: u64,
|
pub address: u64,
|
||||||
pub size: u8,
|
pub size: u8,
|
||||||
pub opcode: u16,
|
pub opcode: u16,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Copy, Clone, Debug)]
|
||||||
|
pub struct ScannedInstruction {
|
||||||
|
pub ins_ref: InstructionRef,
|
||||||
pub branch_dest: Option<u64>,
|
pub branch_dest: Option<u64>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -308,10 +310,6 @@ impl Object {
|
|||||||
let offset = symbol.address.checked_sub(section.address)?;
|
let offset = symbol.address.checked_sub(section.address)?;
|
||||||
section.data.get(offset as usize..offset as usize + symbol.size as usize)
|
section.data.get(offset as usize..offset as usize + symbol.size as usize)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn symbol_by_name(&self, name: &str) -> Option<usize> {
|
|
||||||
self.symbols.iter().position(|symbol| symbol.section.is_some() && symbol.name == name)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
|
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
|
||||||
@ -334,16 +332,6 @@ pub struct ResolvedRelocation<'a> {
|
|||||||
pub symbol: &'a Symbol,
|
pub symbol: &'a Symbol,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone)]
|
|
||||||
pub struct ResolvedSymbol<'obj> {
|
|
||||||
pub obj: &'obj Object,
|
|
||||||
pub symbol_index: usize,
|
|
||||||
pub symbol: &'obj Symbol,
|
|
||||||
pub section_index: usize,
|
|
||||||
pub section: &'obj Section,
|
|
||||||
pub data: &'obj [u8],
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
pub struct ResolvedInstructionRef<'obj> {
|
pub struct ResolvedInstructionRef<'obj> {
|
||||||
pub ins_ref: InstructionRef,
|
pub ins_ref: InstructionRef,
|
||||||
@ -375,7 +363,6 @@ static DUMMY_SECTION: Section = Section {
|
|||||||
kind: SectionKind::Unknown,
|
kind: SectionKind::Unknown,
|
||||||
data: SectionData(Vec::new()),
|
data: SectionData(Vec::new()),
|
||||||
flags: SectionFlagSet::empty(),
|
flags: SectionFlagSet::empty(),
|
||||||
align: None,
|
|
||||||
relocations: Vec::new(),
|
relocations: Vec::new(),
|
||||||
line_info: BTreeMap::new(),
|
line_info: BTreeMap::new(),
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
|
@ -4,7 +4,7 @@ use alloc::{
|
|||||||
string::{String, ToString},
|
string::{String, ToString},
|
||||||
vec::Vec,
|
vec::Vec,
|
||||||
};
|
};
|
||||||
use core::{cmp::Ordering, num::NonZeroU64};
|
use core::cmp::Ordering;
|
||||||
|
|
||||||
use anyhow::{Context, Result, anyhow, bail, ensure};
|
use anyhow::{Context, Result, anyhow, bail, ensure};
|
||||||
use object::{Object as _, ObjectSection as _, ObjectSymbol as _};
|
use object::{Object as _, ObjectSection as _, ObjectSymbol as _};
|
||||||
@ -17,7 +17,7 @@ use crate::{
|
|||||||
Symbol, SymbolFlag, SymbolKind,
|
Symbol, SymbolFlag, SymbolKind,
|
||||||
split_meta::{SPLITMETA_SECTION, SplitMeta},
|
split_meta::{SPLITMETA_SECTION, SplitMeta},
|
||||||
},
|
},
|
||||||
util::{align_data_slice_to, align_u64_to, read_u16, read_u32},
|
util::{read_u16, read_u32},
|
||||||
};
|
};
|
||||||
|
|
||||||
fn map_section_kind(section: &object::Section) -> SectionKind {
|
fn map_section_kind(section: &object::Section) -> SectionKind {
|
||||||
@ -121,15 +121,6 @@ fn map_symbols(
|
|||||||
Ok((symbols, symbol_indices))
|
Ok((symbols, symbol_indices))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// When inferring a symbol's size, we ignore symbols that start with specific prefixes. They are
|
|
||||||
/// usually emitted as branch targets and do not represent the start of a function or object.
|
|
||||||
fn is_local_label(symbol: &Symbol) -> bool {
|
|
||||||
const LABEL_PREFIXES: &[&str] = &[".L", "LAB_"];
|
|
||||||
symbol.size == 0
|
|
||||||
&& symbol.flags.contains(SymbolFlag::Local)
|
|
||||||
&& LABEL_PREFIXES.iter().any(|p| symbol.name.starts_with(p))
|
|
||||||
}
|
|
||||||
|
|
||||||
fn infer_symbol_sizes(symbols: &mut [Symbol], sections: &[Section]) {
|
fn infer_symbol_sizes(symbols: &mut [Symbol], sections: &[Section]) {
|
||||||
// Create a sorted list of symbol indices by section
|
// Create a sorted list of symbol indices by section
|
||||||
let mut symbols_with_section = Vec::<usize>::with_capacity(symbols.len());
|
let mut symbols_with_section = Vec::<usize>::with_capacity(symbols.len());
|
||||||
@ -176,7 +167,10 @@ fn infer_symbol_sizes(symbols: &mut [Symbol], sections: &[Section]) {
|
|||||||
if last_end.0 == section_idx && last_end.1 > symbol.address {
|
if last_end.0 == section_idx && last_end.1 > symbol.address {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let next_symbol = loop {
|
let next_symbol = match symbol.kind {
|
||||||
|
// For function/object symbols, find the next function/object symbol (in other words:
|
||||||
|
// skip over labels)
|
||||||
|
SymbolKind::Function | SymbolKind::Object => loop {
|
||||||
if iter_idx >= symbols_with_section.len() {
|
if iter_idx >= symbols_with_section.len() {
|
||||||
break None;
|
break None;
|
||||||
}
|
}
|
||||||
@ -184,20 +178,16 @@ fn infer_symbol_sizes(symbols: &mut [Symbol], sections: &[Section]) {
|
|||||||
if next_symbol.section != Some(section_idx) {
|
if next_symbol.section != Some(section_idx) {
|
||||||
break None;
|
break None;
|
||||||
}
|
}
|
||||||
if match symbol.kind {
|
if let SymbolKind::Function | SymbolKind::Object = next_symbol.kind {
|
||||||
SymbolKind::Function | SymbolKind::Object => {
|
|
||||||
// For function/object symbols, find the next function/object
|
|
||||||
matches!(next_symbol.kind, SymbolKind::Function | SymbolKind::Object)
|
|
||||||
}
|
|
||||||
SymbolKind::Unknown | SymbolKind::Section => {
|
|
||||||
// For labels (or anything else), stop at any symbol
|
|
||||||
true
|
|
||||||
}
|
|
||||||
} && !is_local_label(next_symbol)
|
|
||||||
{
|
|
||||||
break Some(next_symbol);
|
break Some(next_symbol);
|
||||||
}
|
}
|
||||||
iter_idx += 1;
|
iter_idx += 1;
|
||||||
|
},
|
||||||
|
// For labels (or anything else), simply use the next symbol's address
|
||||||
|
SymbolKind::Unknown | SymbolKind::Section => symbols_with_section
|
||||||
|
.get(iter_idx)
|
||||||
|
.map(|&i| &symbols[i])
|
||||||
|
.take_if(|s| s.section == Some(section_idx)),
|
||||||
};
|
};
|
||||||
let next_address = next_symbol.map(|s| s.address).unwrap_or_else(|| {
|
let next_address = next_symbol.map(|s| s.address).unwrap_or_else(|| {
|
||||||
let section = §ions[section_idx];
|
let section = §ions[section_idx];
|
||||||
@ -267,7 +257,6 @@ fn map_sections(
|
|||||||
kind,
|
kind,
|
||||||
data: SectionData(data),
|
data: SectionData(data),
|
||||||
flags: Default::default(),
|
flags: Default::default(),
|
||||||
align: NonZeroU64::new(section.align()),
|
|
||||||
relocations: Default::default(),
|
relocations: Default::default(),
|
||||||
virtual_address,
|
virtual_address,
|
||||||
line_info: Default::default(),
|
line_info: Default::default(),
|
||||||
@ -351,7 +340,7 @@ fn map_section_relocations(
|
|||||||
let idx = if let Some(section_symbol) = obj_file
|
let idx = if let Some(section_symbol) = obj_file
|
||||||
.symbol_by_index(idx)
|
.symbol_by_index(idx)
|
||||||
.ok()
|
.ok()
|
||||||
.filter(|s| s.kind() == object::SymbolKind::Section)
|
.take_if(|s| s.kind() == object::SymbolKind::Section)
|
||||||
{
|
{
|
||||||
let section_index =
|
let section_index =
|
||||||
section_symbol.section_index().context("Section symbol without section")?;
|
section_symbol.section_index().context("Section symbol without section")?;
|
||||||
@ -750,10 +739,7 @@ fn do_combine_sections(
|
|||||||
}
|
}
|
||||||
offsets.push(current_offset);
|
offsets.push(current_offset);
|
||||||
current_offset += section.size;
|
current_offset += section.size;
|
||||||
let align = section.combined_alignment();
|
|
||||||
current_offset = align_u64_to(current_offset, align);
|
|
||||||
data_size += section.data.len();
|
data_size += section.data.len();
|
||||||
data_size = align_u64_to(data_size as u64, align) as usize;
|
|
||||||
num_relocations += section.relocations.len();
|
num_relocations += section.relocations.len();
|
||||||
}
|
}
|
||||||
if data_size > 0 {
|
if data_size > 0 {
|
||||||
@ -768,13 +754,12 @@ fn do_combine_sections(
|
|||||||
let section = &mut sections[i];
|
let section = &mut sections[i];
|
||||||
section.size = 0;
|
section.size = 0;
|
||||||
data.append(&mut section.data.0);
|
data.append(&mut section.data.0);
|
||||||
align_data_slice_to(&mut data, section.combined_alignment());
|
|
||||||
section.relocations.iter_mut().for_each(|r| r.address += offset);
|
section.relocations.iter_mut().for_each(|r| r.address += offset);
|
||||||
relocations.append(&mut section.relocations);
|
relocations.append(&mut section.relocations);
|
||||||
line_info.append(&mut section.line_info.iter().map(|(&a, &l)| (a + offset, l)).collect());
|
line_info.append(&mut section.line_info.iter().map(|(&a, &l)| (a + offset, l)).collect());
|
||||||
section.line_info.clear();
|
section.line_info.clear();
|
||||||
if offset > 0 {
|
if offset > 0 {
|
||||||
section.kind = SectionKind::Unknown;
|
section.flags |= SectionFlag::Hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@ -858,7 +843,7 @@ pub fn read(obj_path: &std::path::Path, config: &DiffObjConfig) -> Result<Object
|
|||||||
|
|
||||||
pub fn parse(data: &[u8], config: &DiffObjConfig) -> Result<Object> {
|
pub fn parse(data: &[u8], config: &DiffObjConfig) -> Result<Object> {
|
||||||
let obj_file = object::File::parse(data)?;
|
let obj_file = object::File::parse(data)?;
|
||||||
let mut arch = new_arch(&obj_file)?;
|
let arch = new_arch(&obj_file)?;
|
||||||
let split_meta = parse_split_meta(&obj_file)?;
|
let split_meta = parse_split_meta(&obj_file)?;
|
||||||
let (mut sections, section_indices) =
|
let (mut sections, section_indices) =
|
||||||
map_sections(arch.as_ref(), &obj_file, split_meta.as_ref())?;
|
map_sections(arch.as_ref(), &obj_file, split_meta.as_ref())?;
|
||||||
@ -872,7 +857,6 @@ pub fn parse(data: &[u8], config: &DiffObjConfig) -> Result<Object> {
|
|||||||
if config.combine_data_sections || config.combine_text_sections {
|
if config.combine_data_sections || config.combine_text_sections {
|
||||||
combine_sections(&mut sections, &mut symbols, config)?;
|
combine_sections(&mut sections, &mut symbols, config)?;
|
||||||
}
|
}
|
||||||
arch.post_init(§ions, &symbols);
|
|
||||||
Ok(Object {
|
Ok(Object {
|
||||||
arch,
|
arch,
|
||||||
endianness: obj_file.endianness(),
|
endianness: obj_file.endianness(),
|
||||||
|
@ -14,7 +14,6 @@ expression: "(sections, symbols)"
|
|||||||
8,
|
8,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: None,
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Elf(
|
flags: Elf(
|
||||||
@ -54,7 +53,6 @@ expression: "(sections, symbols)"
|
|||||||
12,
|
12,
|
||||||
),
|
),
|
||||||
flags: FlagSet(Combined),
|
flags: FlagSet(Combined),
|
||||||
align: None,
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Elf(
|
flags: Elf(
|
||||||
@ -84,12 +82,11 @@ expression: "(sections, symbols)"
|
|||||||
name: ".data",
|
name: ".data",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: None,
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -99,12 +96,11 @@ expression: "(sections, symbols)"
|
|||||||
name: ".data",
|
name: ".data",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: None,
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
|
@ -3,10 +3,6 @@ use alloc::{string::String, vec, vec::Vec};
|
|||||||
use anyhow::{Result, anyhow};
|
use anyhow::{Result, anyhow};
|
||||||
use object::{Endian, ObjectSection, elf::SHT_NOTE};
|
use object::{Endian, ObjectSection, elf::SHT_NOTE};
|
||||||
|
|
||||||
#[cfg(feature = "std")]
|
|
||||||
use crate::util::align_data_to_4;
|
|
||||||
use crate::util::align_size_to_4;
|
|
||||||
|
|
||||||
pub const SPLITMETA_SECTION: &str = ".note.split";
|
pub const SPLITMETA_SECTION: &str = ".note.split";
|
||||||
pub const SHT_SPLITMETA: u32 = SHT_NOTE;
|
pub const SHT_SPLITMETA: u32 = SHT_NOTE;
|
||||||
pub const ELF_NOTE_SPLIT: &[u8] = b"Split";
|
pub const ELF_NOTE_SPLIT: &[u8] = b"Split";
|
||||||
@ -194,6 +190,17 @@ where E: Endian
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn align_size_to_4(size: usize) -> usize { (size + 3) & !3 }
|
||||||
|
|
||||||
|
#[cfg(feature = "std")]
|
||||||
|
fn align_data_to_4<W: std::io::Write + ?Sized>(writer: &mut W, len: usize) -> std::io::Result<()> {
|
||||||
|
const ALIGN_BYTES: &[u8] = &[0; 4];
|
||||||
|
if len % 4 != 0 {
|
||||||
|
writer.write_all(&ALIGN_BYTES[..4 - len % 4])?;
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
// ELF note format:
|
// ELF note format:
|
||||||
// Name Size | 4 bytes (integer)
|
// Name Size | 4 bytes (integer)
|
||||||
// Desc Size | 4 bytes (integer)
|
// Desc Size | 4 bytes (integer)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use alloc::{format, vec::Vec};
|
use alloc::format;
|
||||||
use core::fmt;
|
use core::fmt;
|
||||||
|
|
||||||
use anyhow::{Result, ensure};
|
use anyhow::{Result, ensure};
|
||||||
@ -39,23 +39,3 @@ pub fn read_u16(obj_file: &object::File, reader: &mut &[u8]) -> Result<u16> {
|
|||||||
*reader = &reader[2..];
|
*reader = &reader[2..];
|
||||||
Ok(obj_file.endianness().read_u16(value))
|
Ok(obj_file.endianness().read_u16(value))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn align_size_to_4(size: usize) -> usize { (size + 3) & !3 }
|
|
||||||
|
|
||||||
#[cfg(feature = "std")]
|
|
||||||
pub fn align_data_to_4<W: std::io::Write + ?Sized>(
|
|
||||||
writer: &mut W,
|
|
||||||
len: usize,
|
|
||||||
) -> std::io::Result<()> {
|
|
||||||
const ALIGN_BYTES: &[u8] = &[0; 4];
|
|
||||||
if len % 4 != 0 {
|
|
||||||
writer.write_all(&ALIGN_BYTES[..4 - len % 4])?;
|
|
||||||
}
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn align_u64_to(len: u64, align: u64) -> u64 { len + ((align - (len % align)) % align) }
|
|
||||||
|
|
||||||
pub fn align_data_slice_to(data: &mut Vec<u8>, align: u64) {
|
|
||||||
data.resize(align_u64_to(data.len() as u64, align) as usize, 0);
|
|
||||||
}
|
|
||||||
|
@ -5,7 +5,7 @@ mod common;
|
|||||||
#[test]
|
#[test]
|
||||||
#[cfg(feature = "arm")]
|
#[cfg(feature = "arm")]
|
||||||
fn read_arm() {
|
fn read_arm() {
|
||||||
let diff_config = diff::DiffObjConfig { ..Default::default() };
|
let diff_config = diff::DiffObjConfig { mips_register_prefix: true, ..Default::default() };
|
||||||
let obj = obj::read::parse(include_object!("data/arm/LinkStateItem.o"), &diff_config).unwrap();
|
let obj = obj::read::parse(include_object!("data/arm/LinkStateItem.o"), &diff_config).unwrap();
|
||||||
insta::assert_debug_snapshot!(obj);
|
insta::assert_debug_snapshot!(obj);
|
||||||
let symbol_idx =
|
let symbol_idx =
|
||||||
@ -19,7 +19,7 @@ fn read_arm() {
|
|||||||
#[test]
|
#[test]
|
||||||
#[cfg(feature = "arm")]
|
#[cfg(feature = "arm")]
|
||||||
fn read_thumb() {
|
fn read_thumb() {
|
||||||
let diff_config = diff::DiffObjConfig { ..Default::default() };
|
let diff_config = diff::DiffObjConfig { mips_register_prefix: true, ..Default::default() };
|
||||||
let obj = obj::read::parse(include_object!("data/arm/thumb.o"), &diff_config).unwrap();
|
let obj = obj::read::parse(include_object!("data/arm/thumb.o"), &diff_config).unwrap();
|
||||||
insta::assert_debug_snapshot!(obj);
|
insta::assert_debug_snapshot!(obj);
|
||||||
let symbol_idx = obj
|
let symbol_idx = obj
|
||||||
@ -32,15 +32,3 @@ fn read_thumb() {
|
|||||||
let output = common::display_diff(&obj, &diff, symbol_idx, &diff_config);
|
let output = common::display_diff(&obj, &diff, symbol_idx, &diff_config);
|
||||||
insta::assert_snapshot!(output);
|
insta::assert_snapshot!(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
#[cfg(feature = "arm")]
|
|
||||||
fn combine_text_sections() {
|
|
||||||
let diff_config = diff::DiffObjConfig { combine_text_sections: true, ..Default::default() };
|
|
||||||
let obj = obj::read::parse(include_object!("data/arm/enemy300.o"), &diff_config).unwrap();
|
|
||||||
let symbol_idx = obj.symbols.iter().position(|s| s.name == "Enemy300Draw").unwrap();
|
|
||||||
let diff = diff::code::no_diff_code(&obj, symbol_idx, &diff_config).unwrap();
|
|
||||||
insta::assert_debug_snapshot!(diff.instruction_rows);
|
|
||||||
let output = common::display_diff(&obj, &diff, symbol_idx, &diff_config);
|
|
||||||
insta::assert_snapshot!(output);
|
|
||||||
}
|
|
||||||
|
@ -55,25 +55,3 @@ fn display_section_ordering() {
|
|||||||
diff::display::display_sections(&obj, &obj_diff, SymbolFilter::None, false, false, false);
|
diff::display::display_sections(&obj, &obj_diff, SymbolFilter::None, false, false, false);
|
||||||
insta::assert_debug_snapshot!(section_display);
|
insta::assert_debug_snapshot!(section_display);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
#[cfg(feature = "x86")]
|
|
||||||
fn read_x86_jumptable() {
|
|
||||||
let diff_config = diff::DiffObjConfig::default();
|
|
||||||
let obj = obj::read::parse(include_object!("data/x86/jumptable.o"), &diff_config).unwrap();
|
|
||||||
insta::assert_debug_snapshot!(obj);
|
|
||||||
let symbol_idx = obj.symbols.iter().position(|s| s.name == "?test@@YAHH@Z").unwrap();
|
|
||||||
let diff = diff::code::no_diff_code(&obj, symbol_idx, &diff_config).unwrap();
|
|
||||||
insta::assert_debug_snapshot!(diff.instruction_rows);
|
|
||||||
let output = common::display_diff(&obj, &diff, symbol_idx, &diff_config);
|
|
||||||
insta::assert_snapshot!(output);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Inferred size of functions should ignore symbols with specific prefixes
|
|
||||||
#[test]
|
|
||||||
#[cfg(feature = "x86")]
|
|
||||||
fn read_x86_local_labels() {
|
|
||||||
let diff_config = diff::DiffObjConfig::default();
|
|
||||||
let obj = obj::read::parse(include_object!("data/x86/local_labels.obj"), &diff_config).unwrap();
|
|
||||||
insta::assert_debug_snapshot!(obj);
|
|
||||||
}
|
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
source: objdiff-core/tests/arch_arm.rs
|
|
||||||
expression: output
|
|
||||||
---
|
|
||||||
[(Line(90), Dim, 5), (Address(0), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 32799), Normal, 10), (Argument(Opaque("r12")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(0)), Normal, 0), (Basic("]"), Normal, 0), (Basic(" (->"), Normal, 0), (BranchDest(8), Normal, 0), (Basic(")"), Normal, 0), (Eol, Normal, 0)]
|
|
||||||
[(Line(90), Dim, 5), (Address(4), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bx", 32779), Normal, 10), (Argument(Opaque("r12")), Normal, 0), (Eol, Normal, 0)]
|
|
||||||
[(Line(90), Dim, 5), (Address(8), Normal, 5), (Spacing(4), Normal, 0), (Opcode(".word", 65535), Normal, 10), (Symbol(Symbol { name: "esEnemyDraw", demangled_name: None, address: 0, size: 0, kind: Unknown, section: None, flags: FlagSet(Global), align: None, virtual_address: None }), Bright, 0), (Eol, Normal, 0)]
|
|
@ -1,48 +0,0 @@
|
|||||||
---
|
|
||||||
source: objdiff-core/tests/arch_arm.rs
|
|
||||||
expression: diff.instruction_rows
|
|
||||||
---
|
|
||||||
[
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 76,
|
|
||||||
size: 4,
|
|
||||||
opcode: 32799,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 80,
|
|
||||||
size: 4,
|
|
||||||
opcode: 32779,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 84,
|
|
||||||
size: 4,
|
|
||||||
opcode: 65535,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
]
|
|
@ -9,7 +9,6 @@ expression: diff.instruction_rows
|
|||||||
address: 40,
|
address: 40,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32895,
|
opcode: 32895,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -23,7 +22,6 @@ expression: diff.instruction_rows
|
|||||||
address: 44,
|
address: 44,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32818,
|
opcode: 32818,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -37,7 +35,6 @@ expression: diff.instruction_rows
|
|||||||
address: 48,
|
address: 48,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32818,
|
opcode: 32818,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -51,7 +48,6 @@ expression: diff.instruction_rows
|
|||||||
address: 52,
|
address: 52,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32774,
|
opcode: 32774,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -65,7 +61,6 @@ expression: diff.instruction_rows
|
|||||||
address: 56,
|
address: 56,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32799,
|
opcode: 32799,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -79,7 +74,6 @@ expression: diff.instruction_rows
|
|||||||
address: 60,
|
address: 60,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32786,
|
opcode: 32786,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -93,7 +87,6 @@ expression: diff.instruction_rows
|
|||||||
address: 64,
|
address: 64,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32770,
|
opcode: 32770,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -107,9 +100,6 @@ expression: diff.instruction_rows
|
|||||||
address: 68,
|
address: 68,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
240,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -128,9 +118,6 @@ expression: diff.instruction_rows
|
|||||||
address: 72,
|
address: 72,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
240,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -149,9 +136,6 @@ expression: diff.instruction_rows
|
|||||||
address: 76,
|
address: 76,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
240,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -170,9 +154,6 @@ expression: diff.instruction_rows
|
|||||||
address: 80,
|
address: 80,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
240,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -191,9 +172,6 @@ expression: diff.instruction_rows
|
|||||||
address: 84,
|
address: 84,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
232,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -212,9 +190,6 @@ expression: diff.instruction_rows
|
|||||||
address: 88,
|
address: 88,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
164,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -233,9 +208,6 @@ expression: diff.instruction_rows
|
|||||||
address: 92,
|
address: 92,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
240,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -254,9 +226,6 @@ expression: diff.instruction_rows
|
|||||||
address: 96,
|
address: 96,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
180,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -275,9 +244,6 @@ expression: diff.instruction_rows
|
|||||||
address: 100,
|
address: 100,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
116,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -296,9 +262,6 @@ expression: diff.instruction_rows
|
|||||||
address: 104,
|
address: 104,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
192,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -317,9 +280,6 @@ expression: diff.instruction_rows
|
|||||||
address: 108,
|
address: 108,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
204,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -338,9 +298,6 @@ expression: diff.instruction_rows
|
|||||||
address: 112,
|
address: 112,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
204,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -359,7 +316,6 @@ expression: diff.instruction_rows
|
|||||||
address: 116,
|
address: 116,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32799,
|
opcode: 32799,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -380,7 +336,6 @@ expression: diff.instruction_rows
|
|||||||
address: 120,
|
address: 120,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32799,
|
opcode: 32799,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -394,7 +349,6 @@ expression: diff.instruction_rows
|
|||||||
address: 124,
|
address: 124,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32774,
|
opcode: 32774,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -408,7 +362,6 @@ expression: diff.instruction_rows
|
|||||||
address: 128,
|
address: 128,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32800,
|
opcode: 32800,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -422,7 +375,6 @@ expression: diff.instruction_rows
|
|||||||
address: 132,
|
address: 132,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32786,
|
opcode: 32786,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -436,9 +388,6 @@ expression: diff.instruction_rows
|
|||||||
address: 136,
|
address: 136,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
148,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -457,9 +406,6 @@ expression: diff.instruction_rows
|
|||||||
address: 140,
|
address: 140,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32774,
|
opcode: 32774,
|
||||||
branch_dest: Some(
|
|
||||||
464,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -478,7 +424,6 @@ expression: diff.instruction_rows
|
|||||||
address: 144,
|
address: 144,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32774,
|
opcode: 32774,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -492,7 +437,6 @@ expression: diff.instruction_rows
|
|||||||
address: 148,
|
address: 148,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32799,
|
opcode: 32799,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -513,7 +457,6 @@ expression: diff.instruction_rows
|
|||||||
address: 152,
|
address: 152,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32799,
|
opcode: 32799,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -527,7 +470,6 @@ expression: diff.instruction_rows
|
|||||||
address: 156,
|
address: 156,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32777,
|
opcode: 32777,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -541,9 +483,6 @@ expression: diff.instruction_rows
|
|||||||
address: 160,
|
address: 160,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
240,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -562,7 +501,6 @@ expression: diff.instruction_rows
|
|||||||
address: 164,
|
address: 164,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32818,
|
opcode: 32818,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -583,7 +521,6 @@ expression: diff.instruction_rows
|
|||||||
address: 168,
|
address: 168,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32818,
|
opcode: 32818,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -597,7 +534,6 @@ expression: diff.instruction_rows
|
|||||||
address: 172,
|
address: 172,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32774,
|
opcode: 32774,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -611,9 +547,6 @@ expression: diff.instruction_rows
|
|||||||
address: 176,
|
address: 176,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
240,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -632,7 +565,6 @@ expression: diff.instruction_rows
|
|||||||
address: 180,
|
address: 180,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32818,
|
opcode: 32818,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -653,7 +585,6 @@ expression: diff.instruction_rows
|
|||||||
address: 184,
|
address: 184,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32774,
|
opcode: 32774,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -667,9 +598,6 @@ expression: diff.instruction_rows
|
|||||||
address: 188,
|
address: 188,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
240,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -688,7 +616,6 @@ expression: diff.instruction_rows
|
|||||||
address: 192,
|
address: 192,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32818,
|
opcode: 32818,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -709,7 +636,6 @@ expression: diff.instruction_rows
|
|||||||
address: 196,
|
address: 196,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32774,
|
opcode: 32774,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -723,9 +649,6 @@ expression: diff.instruction_rows
|
|||||||
address: 200,
|
address: 200,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
240,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -744,7 +667,6 @@ expression: diff.instruction_rows
|
|||||||
address: 204,
|
address: 204,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32799,
|
opcode: 32799,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -766,7 +688,6 @@ expression: diff.instruction_rows
|
|||||||
address: 208,
|
address: 208,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32818,
|
opcode: 32818,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -780,7 +701,6 @@ expression: diff.instruction_rows
|
|||||||
address: 212,
|
address: 212,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32799,
|
opcode: 32799,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -794,7 +714,6 @@ expression: diff.instruction_rows
|
|||||||
address: 216,
|
address: 216,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32818,
|
opcode: 32818,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -808,7 +727,6 @@ expression: diff.instruction_rows
|
|||||||
address: 220,
|
address: 220,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32899,
|
opcode: 32899,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -822,7 +740,6 @@ expression: diff.instruction_rows
|
|||||||
address: 224,
|
address: 224,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32774,
|
opcode: 32774,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -836,9 +753,6 @@ expression: diff.instruction_rows
|
|||||||
address: 228,
|
address: 228,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
240,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -857,7 +771,6 @@ expression: diff.instruction_rows
|
|||||||
address: 232,
|
address: 232,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32818,
|
opcode: 32818,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -878,7 +791,6 @@ expression: diff.instruction_rows
|
|||||||
address: 236,
|
address: 236,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32774,
|
opcode: 32774,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -892,7 +804,6 @@ expression: diff.instruction_rows
|
|||||||
address: 240,
|
address: 240,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32799,
|
opcode: 32799,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -922,7 +833,6 @@ expression: diff.instruction_rows
|
|||||||
address: 244,
|
address: 244,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32829,
|
opcode: 32829,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -936,7 +846,6 @@ expression: diff.instruction_rows
|
|||||||
address: 248,
|
address: 248,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32786,
|
opcode: 32786,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -950,9 +859,6 @@ expression: diff.instruction_rows
|
|||||||
address: 252,
|
address: 252,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
276,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -971,7 +877,6 @@ expression: diff.instruction_rows
|
|||||||
address: 256,
|
address: 256,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32818,
|
opcode: 32818,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -985,7 +890,6 @@ expression: diff.instruction_rows
|
|||||||
address: 260,
|
address: 260,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32774,
|
opcode: 32774,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -999,7 +903,6 @@ expression: diff.instruction_rows
|
|||||||
address: 264,
|
address: 264,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32799,
|
opcode: 32799,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1013,7 +916,6 @@ expression: diff.instruction_rows
|
|||||||
address: 268,
|
address: 268,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32799,
|
opcode: 32799,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1027,7 +929,6 @@ expression: diff.instruction_rows
|
|||||||
address: 272,
|
address: 272,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32778,
|
opcode: 32778,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1041,7 +942,6 @@ expression: diff.instruction_rows
|
|||||||
address: 276,
|
address: 276,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32799,
|
opcode: 32799,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1062,7 +962,6 @@ expression: diff.instruction_rows
|
|||||||
address: 280,
|
address: 280,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32786,
|
opcode: 32786,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1076,9 +975,6 @@ expression: diff.instruction_rows
|
|||||||
address: 284,
|
address: 284,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
328,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1097,9 +993,6 @@ expression: diff.instruction_rows
|
|||||||
address: 288,
|
address: 288,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
336,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1118,7 +1011,6 @@ expression: diff.instruction_rows
|
|||||||
address: 292,
|
address: 292,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32786,
|
opcode: 32786,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1132,9 +1024,6 @@ expression: diff.instruction_rows
|
|||||||
address: 296,
|
address: 296,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
348,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1153,7 +1042,6 @@ expression: diff.instruction_rows
|
|||||||
address: 300,
|
address: 300,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32829,
|
opcode: 32829,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1167,7 +1055,6 @@ expression: diff.instruction_rows
|
|||||||
address: 304,
|
address: 304,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32786,
|
opcode: 32786,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1181,9 +1068,6 @@ expression: diff.instruction_rows
|
|||||||
address: 308,
|
address: 308,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
348,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1202,7 +1086,6 @@ expression: diff.instruction_rows
|
|||||||
address: 312,
|
address: 312,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32786,
|
opcode: 32786,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1216,7 +1099,6 @@ expression: diff.instruction_rows
|
|||||||
address: 316,
|
address: 316,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32786,
|
opcode: 32786,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1230,9 +1112,6 @@ expression: diff.instruction_rows
|
|||||||
address: 320,
|
address: 320,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
380,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1251,9 +1130,6 @@ expression: diff.instruction_rows
|
|||||||
address: 324,
|
address: 324,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
348,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1272,7 +1148,6 @@ expression: diff.instruction_rows
|
|||||||
address: 328,
|
address: 328,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32786,
|
opcode: 32786,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1293,9 +1168,6 @@ expression: diff.instruction_rows
|
|||||||
address: 332,
|
address: 332,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
348,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1314,7 +1186,6 @@ expression: diff.instruction_rows
|
|||||||
address: 336,
|
address: 336,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32818,
|
opcode: 32818,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1335,7 +1206,6 @@ expression: diff.instruction_rows
|
|||||||
address: 340,
|
address: 340,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32774,
|
opcode: 32774,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1349,9 +1219,6 @@ expression: diff.instruction_rows
|
|||||||
address: 344,
|
address: 344,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
380,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1370,7 +1237,6 @@ expression: diff.instruction_rows
|
|||||||
address: 348,
|
address: 348,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32818,
|
opcode: 32818,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1394,7 +1260,6 @@ expression: diff.instruction_rows
|
|||||||
address: 352,
|
address: 352,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32774,
|
opcode: 32774,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1408,7 +1273,6 @@ expression: diff.instruction_rows
|
|||||||
address: 356,
|
address: 356,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32786,
|
opcode: 32786,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1422,7 +1286,6 @@ expression: diff.instruction_rows
|
|||||||
address: 360,
|
address: 360,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32786,
|
opcode: 32786,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1436,9 +1299,6 @@ expression: diff.instruction_rows
|
|||||||
address: 364,
|
address: 364,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
380,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1457,7 +1317,6 @@ expression: diff.instruction_rows
|
|||||||
address: 368,
|
address: 368,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32774,
|
opcode: 32774,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1471,7 +1330,6 @@ expression: diff.instruction_rows
|
|||||||
address: 372,
|
address: 372,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32818,
|
opcode: 32818,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1485,7 +1343,6 @@ expression: diff.instruction_rows
|
|||||||
address: 376,
|
address: 376,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32899,
|
opcode: 32899,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1499,7 +1356,6 @@ expression: diff.instruction_rows
|
|||||||
address: 380,
|
address: 380,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32829,
|
opcode: 32829,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1522,7 +1378,6 @@ expression: diff.instruction_rows
|
|||||||
address: 384,
|
address: 384,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32770,
|
opcode: 32770,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1536,7 +1391,6 @@ expression: diff.instruction_rows
|
|||||||
address: 388,
|
address: 388,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32770,
|
opcode: 32770,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1550,7 +1404,6 @@ expression: diff.instruction_rows
|
|||||||
address: 392,
|
address: 392,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32898,
|
opcode: 32898,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1564,7 +1417,6 @@ expression: diff.instruction_rows
|
|||||||
address: 396,
|
address: 396,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32786,
|
opcode: 32786,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1578,9 +1430,6 @@ expression: diff.instruction_rows
|
|||||||
address: 400,
|
address: 400,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
424,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1599,7 +1448,6 @@ expression: diff.instruction_rows
|
|||||||
address: 404,
|
address: 404,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32818,
|
opcode: 32818,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1620,7 +1468,6 @@ expression: diff.instruction_rows
|
|||||||
address: 408,
|
address: 408,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32774,
|
opcode: 32774,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1634,7 +1481,6 @@ expression: diff.instruction_rows
|
|||||||
address: 412,
|
address: 412,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32770,
|
opcode: 32770,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1648,7 +1494,6 @@ expression: diff.instruction_rows
|
|||||||
address: 416,
|
address: 416,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32786,
|
opcode: 32786,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1662,9 +1507,6 @@ expression: diff.instruction_rows
|
|||||||
address: 420,
|
address: 420,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
404,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1683,7 +1525,6 @@ expression: diff.instruction_rows
|
|||||||
address: 424,
|
address: 424,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32799,
|
opcode: 32799,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1704,7 +1545,6 @@ expression: diff.instruction_rows
|
|||||||
address: 428,
|
address: 428,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32799,
|
opcode: 32799,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1718,7 +1558,6 @@ expression: diff.instruction_rows
|
|||||||
address: 432,
|
address: 432,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32800,
|
opcode: 32800,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1732,7 +1571,6 @@ expression: diff.instruction_rows
|
|||||||
address: 436,
|
address: 436,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32786,
|
opcode: 32786,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1746,9 +1584,6 @@ expression: diff.instruction_rows
|
|||||||
address: 440,
|
address: 440,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32773,
|
opcode: 32773,
|
||||||
branch_dest: Some(
|
|
||||||
448,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1767,7 +1602,6 @@ expression: diff.instruction_rows
|
|||||||
address: 444,
|
address: 444,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32774,
|
opcode: 32774,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1781,7 +1615,6 @@ expression: diff.instruction_rows
|
|||||||
address: 448,
|
address: 448,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32818,
|
opcode: 32818,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1802,7 +1635,6 @@ expression: diff.instruction_rows
|
|||||||
address: 452,
|
address: 452,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32899,
|
opcode: 32899,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1816,7 +1648,6 @@ expression: diff.instruction_rows
|
|||||||
address: 456,
|
address: 456,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 32793,
|
opcode: 32793,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1830,7 +1661,6 @@ expression: diff.instruction_rows
|
|||||||
address: 460,
|
address: 460,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 65535,
|
opcode: 65535,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1844,7 +1674,6 @@ expression: diff.instruction_rows
|
|||||||
address: 464,
|
address: 464,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 65535,
|
opcode: 65535,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1865,7 +1694,6 @@ expression: diff.instruction_rows
|
|||||||
address: 468,
|
address: 468,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 65535,
|
opcode: 65535,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
|
@ -21,15 +21,15 @@ expression: output
|
|||||||
[(Address(64), Normal, 5), (Spacing(4), Normal, 0), (Opcode("b", 32773), Normal, 10), (BranchDest(152), Normal, 0), (Basic(" ~>"), Rotating(5), 0), (Eol, Normal, 0)]
|
[(Address(64), Normal, 5), (Spacing(4), Normal, 0), (Opcode("b", 32773), Normal, 10), (BranchDest(152), Normal, 0), (Basic(" ~>"), Rotating(5), 0), (Eol, Normal, 0)]
|
||||||
[(Address(68), Normal, 5), (Spacing(4), Normal, 0), (Opcode("b", 32773), Normal, 10), (BranchDest(164), Normal, 0), (Basic(" ~>"), Rotating(6), 0), (Eol, Normal, 0)]
|
[(Address(68), Normal, 5), (Spacing(4), Normal, 0), (Opcode("b", 32773), Normal, 10), (BranchDest(164), Normal, 0), (Basic(" ~>"), Rotating(6), 0), (Eol, Normal, 0)]
|
||||||
[(Address(72), Normal, 5), (Spacing(4), Normal, 0), (Opcode("b", 32773), Normal, 10), (BranchDest(164), Normal, 0), (Basic(" ~>"), Rotating(6), 0), (Eol, Normal, 0)]
|
[(Address(72), Normal, 5), (Spacing(4), Normal, 0), (Opcode("b", 32773), Normal, 10), (BranchDest(164), Normal, 0), (Basic(" ~>"), Rotating(6), 0), (Eol, Normal, 0)]
|
||||||
[(Address(76), Normal, 5), (Basic(" ~> "), Rotating(4), 0), (Opcode("ldr", 32799), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(336)), Normal, 0), (Basic("]"), Normal, 0), (Basic(" (->"), Normal, 0), (BranchDest(420), Normal, 0), (Basic(")"), Normal, 0), (Eol, Normal, 0)]
|
[(Address(76), Normal, 5), (Basic(" ~> "), Rotating(4), 0), (Opcode("ldr", 32799), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(336)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Address(80), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 32799), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(0)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
[(Address(80), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 32799), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(0)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Address(84), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bl", 32774), Normal, 10), (Symbol(Symbol { name: "_ZN18UnkStruct_027e103c19func_ov000_020cf01cEv", demangled_name: Some("UnkStruct_027e103c::func_ov000_020cf01c()"), address: 0, size: 0, kind: Unknown, section: None, flags: FlagSet(Global | Weak), align: None, virtual_address: None }), Bright, 0), (Addend(-8), Bright, 0), (Eol, Normal, 0)]
|
[(Address(84), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bl", 32774), Normal, 10), (Symbol(Symbol { name: "_ZN18UnkStruct_027e103c19func_ov000_020cf01cEv", demangled_name: Some("UnkStruct_027e103c::func_ov000_020cf01c()"), address: 0, size: 0, kind: Unknown, section: None, flags: FlagSet(Global | Weak), align: None, virtual_address: None }), Bright, 0), (Addend(-8), Bright, 0), (Eol, Normal, 0)]
|
||||||
[(Address(88), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldrb", 32800), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(224)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
[(Address(88), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldrb", 32800), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(224)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Address(92), Normal, 5), (Spacing(4), Normal, 0), (Opcode("cmp", 32786), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(0)), Normal, 0), (Eol, Normal, 0)]
|
[(Address(92), Normal, 5), (Spacing(4), Normal, 0), (Opcode("cmp", 32786), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(0)), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Address(96), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bne", 32773), Normal, 10), (BranchDest(108), Normal, 0), (Basic(" ~>"), Rotating(7), 0), (Eol, Normal, 0)]
|
[(Address(96), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bne", 32773), Normal, 10), (BranchDest(108), Normal, 0), (Basic(" ~>"), Rotating(7), 0), (Eol, Normal, 0)]
|
||||||
[(Address(100), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bl", 32774), Normal, 10), (BranchDest(424), Normal, 0), (Basic(" ~>"), Rotating(8), 0), (Eol, Normal, 0)]
|
[(Address(100), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bl", 32774), Normal, 10), (Symbol(Symbol { name: "_ZN13LinkStateItem15GetEquipBombchuEv", demangled_name: Some("LinkStateItem::GetEquipBombchu()"), address: 472, size: 16, kind: Function, section: Some(0), flags: FlagSet(Global), align: None, virtual_address: None }), Bright, 0), (Addend(-8), Bright, 0), (Basic(" ~>"), Rotating(8), 0), (Eol, Normal, 0)]
|
||||||
[(Address(104), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bl", 32774), Normal, 10), (Symbol(Symbol { name: "_ZN12EquipBombchu19func_ov014_0213ec64Ev", demangled_name: Some("EquipBombchu::func_ov014_0213ec64()"), address: 0, size: 0, kind: Unknown, section: None, flags: FlagSet(Global | Weak), align: None, virtual_address: None }), Bright, 0), (Addend(-8), Bright, 0), (Eol, Normal, 0)]
|
[(Address(104), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bl", 32774), Normal, 10), (Symbol(Symbol { name: "_ZN12EquipBombchu19func_ov014_0213ec64Ev", demangled_name: Some("EquipBombchu::func_ov014_0213ec64()"), address: 0, size: 0, kind: Unknown, section: None, flags: FlagSet(Global | Weak), align: None, virtual_address: None }), Bright, 0), (Addend(-8), Bright, 0), (Eol, Normal, 0)]
|
||||||
[(Address(108), Normal, 5), (Basic(" ~> "), Rotating(7), 0), (Opcode("ldr", 32799), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(308)), Normal, 0), (Basic("]"), Normal, 0), (Basic(" (->"), Normal, 0), (BranchDest(424), Normal, 0), (Basic(")"), Normal, 0), (Eol, Normal, 0)]
|
[(Address(108), Normal, 5), (Basic(" ~> "), Rotating(7), 0), (Opcode("ldr", 32799), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(308)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Address(112), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 32799), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(0)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
[(Address(112), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 32799), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(0)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Address(116), Normal, 5), (Spacing(4), Normal, 0), (Opcode("blx", 32777), Normal, 10), (Symbol(Symbol { name: "_Z19func_ov014_0211fd04Pi", demangled_name: Some("func_ov014_0211fd04(int*)"), address: 0, size: 0, kind: Unknown, section: None, flags: FlagSet(Global | Weak), align: None, virtual_address: None }), Bright, 0), (Addend(-8), Bright, 0), (Eol, Normal, 0)]
|
[(Address(116), Normal, 5), (Spacing(4), Normal, 0), (Opcode("blx", 32777), Normal, 10), (Symbol(Symbol { name: "_Z19func_ov014_0211fd04Pi", demangled_name: Some("func_ov014_0211fd04(int*)"), address: 0, size: 0, kind: Unknown, section: None, flags: FlagSet(Global | Weak), align: None, virtual_address: None }), Bright, 0), (Addend(-8), Bright, 0), (Eol, Normal, 0)]
|
||||||
[(Address(120), Normal, 5), (Spacing(4), Normal, 0), (Opcode("b", 32773), Normal, 10), (BranchDest(200), Normal, 0), (Basic(" ~>"), Rotating(0), 0), (Eol, Normal, 0)]
|
[(Address(120), Normal, 5), (Spacing(4), Normal, 0), (Opcode("b", 32773), Normal, 10), (BranchDest(200), Normal, 0), (Basic(" ~>"), Rotating(0), 0), (Eol, Normal, 0)]
|
||||||
@ -43,7 +43,7 @@ expression: output
|
|||||||
[(Address(152), Normal, 5), (Basic(" ~> "), Rotating(5), 0), (Opcode("mov", 32818), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r5")), Normal, 0), (Eol, Normal, 0)]
|
[(Address(152), Normal, 5), (Basic(" ~> "), Rotating(5), 0), (Opcode("mov", 32818), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r5")), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Address(156), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bl", 32774), Normal, 10), (Symbol(Symbol { name: "_ZN13LinkStateItem15StopUsingHammerEv", demangled_name: Some("LinkStateItem::StopUsingHammer()"), address: 0, size: 0, kind: Unknown, section: None, flags: FlagSet(Global | Weak), align: None, virtual_address: None }), Bright, 0), (Addend(-8), Bright, 0), (Eol, Normal, 0)]
|
[(Address(156), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bl", 32774), Normal, 10), (Symbol(Symbol { name: "_ZN13LinkStateItem15StopUsingHammerEv", demangled_name: Some("LinkStateItem::StopUsingHammer()"), address: 0, size: 0, kind: Unknown, section: None, flags: FlagSet(Global | Weak), align: None, virtual_address: None }), Bright, 0), (Addend(-8), Bright, 0), (Eol, Normal, 0)]
|
||||||
[(Address(160), Normal, 5), (Spacing(4), Normal, 0), (Opcode("b", 32773), Normal, 10), (BranchDest(200), Normal, 0), (Basic(" ~>"), Rotating(0), 0), (Eol, Normal, 0)]
|
[(Address(160), Normal, 5), (Spacing(4), Normal, 0), (Opcode("b", 32773), Normal, 10), (BranchDest(200), Normal, 0), (Basic(" ~>"), Rotating(0), 0), (Eol, Normal, 0)]
|
||||||
[(Address(164), Normal, 5), (Basic(" ~> "), Rotating(6), 0), (Opcode("ldr", 32799), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(248)), Normal, 0), (Basic("]"), Normal, 0), (Basic(" (->"), Normal, 0), (BranchDest(420), Normal, 0), (Basic(")"), Normal, 0), (Eol, Normal, 0)]
|
[(Address(164), Normal, 5), (Basic(" ~> "), Rotating(6), 0), (Opcode("ldr", 32799), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(248)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Address(168), Normal, 5), (Spacing(4), Normal, 0), (Opcode("mov", 32818), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(0)), Normal, 0), (Eol, Normal, 0)]
|
[(Address(168), Normal, 5), (Spacing(4), Normal, 0), (Opcode("mov", 32818), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(0)), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Address(172), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 32799), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(0)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
[(Address(172), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 32799), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(0)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Address(176), Normal, 5), (Spacing(4), Normal, 0), (Opcode("mov", 32818), Normal, 10), (Argument(Opaque("r2")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r1")), Normal, 0), (Eol, Normal, 0)]
|
[(Address(176), Normal, 5), (Spacing(4), Normal, 0), (Opcode("mov", 32818), Normal, 10), (Argument(Opaque("r2")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r1")), Normal, 0), (Eol, Normal, 0)]
|
||||||
@ -98,7 +98,7 @@ expression: output
|
|||||||
[(Address(372), Normal, 5), (Spacing(4), Normal, 0), (Opcode("add", 32770), Normal, 10), (Argument(Opaque("r6")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r6")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(4)), Normal, 0), (Eol, Normal, 0)]
|
[(Address(372), Normal, 5), (Spacing(4), Normal, 0), (Opcode("add", 32770), Normal, 10), (Argument(Opaque("r6")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r6")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(4)), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Address(376), Normal, 5), (Spacing(4), Normal, 0), (Opcode("cmp", 32786), Normal, 10), (Argument(Opaque("r6")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r4")), Normal, 0), (Eol, Normal, 0)]
|
[(Address(376), Normal, 5), (Spacing(4), Normal, 0), (Opcode("cmp", 32786), Normal, 10), (Argument(Opaque("r6")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r4")), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Address(380), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bne", 32773), Normal, 10), (BranchDest(364), Normal, 0), (Basic(" ~>"), Rotating(15), 0), (Eol, Normal, 0)]
|
[(Address(380), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bne", 32773), Normal, 10), (BranchDest(364), Normal, 0), (Basic(" ~>"), Rotating(15), 0), (Eol, Normal, 0)]
|
||||||
[(Address(384), Normal, 5), (Basic(" ~> "), Rotating(14), 0), (Opcode("ldr", 32799), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(36)), Normal, 0), (Basic("]"), Normal, 0), (Basic(" (->"), Normal, 0), (BranchDest(428), Normal, 0), (Basic(")"), Normal, 0), (Eol, Normal, 0)]
|
[(Address(384), Normal, 5), (Basic(" ~> "), Rotating(14), 0), (Opcode("ldr", 32799), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(36)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Address(388), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 32799), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(0)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
[(Address(388), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 32799), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(0)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Address(392), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldrb", 32800), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(128)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
[(Address(392), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldrb", 32800), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(128)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Address(396), Normal, 5), (Spacing(4), Normal, 0), (Opcode("cmp", 32786), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(0)), Normal, 0), (Eol, Normal, 0)]
|
[(Address(396), Normal, 5), (Spacing(4), Normal, 0), (Opcode("cmp", 32786), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(0)), Normal, 0), (Eol, Normal, 0)]
|
||||||
|
@ -1519,9 +1519,6 @@ Object {
|
|||||||
556,
|
556,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Elf(
|
flags: Elf(
|
||||||
@ -1721,9 +1718,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1738,9 +1732,6 @@ Object {
|
|||||||
76,
|
76,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Elf(
|
flags: Elf(
|
||||||
@ -1892,9 +1883,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1909,9 +1897,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1926,9 +1911,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1943,9 +1925,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
|
@ -9,7 +9,6 @@ expression: diff.instruction_rows
|
|||||||
address: 0,
|
address: 0,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 56,
|
opcode: 56,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -23,7 +22,6 @@ expression: diff.instruction_rows
|
|||||||
address: 2,
|
address: 2,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 74,
|
opcode: 74,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -37,7 +35,6 @@ expression: diff.instruction_rows
|
|||||||
address: 4,
|
address: 4,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 47,
|
opcode: 47,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -51,7 +48,6 @@ expression: diff.instruction_rows
|
|||||||
address: 6,
|
address: 6,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 47,
|
opcode: 47,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -65,7 +61,6 @@ expression: diff.instruction_rows
|
|||||||
address: 8,
|
address: 8,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 47,
|
opcode: 47,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -79,7 +74,6 @@ expression: diff.instruction_rows
|
|||||||
address: 10,
|
address: 10,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 47,
|
opcode: 47,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -93,7 +87,6 @@ expression: diff.instruction_rows
|
|||||||
address: 12,
|
address: 12,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 66,
|
opcode: 66,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -107,7 +100,6 @@ expression: diff.instruction_rows
|
|||||||
address: 14,
|
address: 14,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 19,
|
opcode: 19,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -121,7 +113,6 @@ expression: diff.instruction_rows
|
|||||||
address: 18,
|
address: 18,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 25,
|
opcode: 25,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -135,9 +126,6 @@ expression: diff.instruction_rows
|
|||||||
address: 20,
|
address: 20,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 15,
|
opcode: 15,
|
||||||
branch_dest: Some(
|
|
||||||
212,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -156,7 +144,6 @@ expression: diff.instruction_rows
|
|||||||
address: 22,
|
address: 22,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 38,
|
opcode: 38,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -170,7 +157,6 @@ expression: diff.instruction_rows
|
|||||||
address: 24,
|
address: 24,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 25,
|
opcode: 25,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -184,9 +170,6 @@ expression: diff.instruction_rows
|
|||||||
address: 26,
|
address: 26,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 15,
|
opcode: 15,
|
||||||
branch_dest: Some(
|
|
||||||
48,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -205,7 +188,6 @@ expression: diff.instruction_rows
|
|||||||
address: 28,
|
address: 28,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 34,
|
opcode: 34,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -219,7 +201,6 @@ expression: diff.instruction_rows
|
|||||||
address: 30,
|
address: 30,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 26,
|
opcode: 26,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -233,9 +214,6 @@ expression: diff.instruction_rows
|
|||||||
address: 32,
|
address: 32,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 15,
|
opcode: 15,
|
||||||
branch_dest: Some(
|
|
||||||
94,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -254,7 +232,6 @@ expression: diff.instruction_rows
|
|||||||
address: 34,
|
address: 34,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 35,
|
opcode: 35,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -268,7 +245,6 @@ expression: diff.instruction_rows
|
|||||||
address: 36,
|
address: 36,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 47,
|
opcode: 47,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -282,7 +258,6 @@ expression: diff.instruction_rows
|
|||||||
address: 38,
|
address: 38,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 47,
|
opcode: 47,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -296,7 +271,6 @@ expression: diff.instruction_rows
|
|||||||
address: 40,
|
address: 40,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 19,
|
opcode: 19,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -310,7 +284,6 @@ expression: diff.instruction_rows
|
|||||||
address: 44,
|
address: 44,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 7,
|
opcode: 7,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -324,7 +297,6 @@ expression: diff.instruction_rows
|
|||||||
address: 46,
|
address: 46,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 55,
|
opcode: 55,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -338,7 +310,6 @@ expression: diff.instruction_rows
|
|||||||
address: 48,
|
address: 48,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 47,
|
opcode: 47,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -359,7 +330,6 @@ expression: diff.instruction_rows
|
|||||||
address: 50,
|
address: 50,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 47,
|
opcode: 47,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -373,7 +343,6 @@ expression: diff.instruction_rows
|
|||||||
address: 52,
|
address: 52,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 19,
|
opcode: 19,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -387,7 +356,6 @@ expression: diff.instruction_rows
|
|||||||
address: 56,
|
address: 56,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 25,
|
opcode: 25,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -401,9 +369,6 @@ expression: diff.instruction_rows
|
|||||||
address: 58,
|
address: 58,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 15,
|
opcode: 15,
|
||||||
branch_dest: Some(
|
|
||||||
212,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -422,7 +387,6 @@ expression: diff.instruction_rows
|
|||||||
address: 60,
|
address: 60,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 34,
|
opcode: 34,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -436,7 +400,6 @@ expression: diff.instruction_rows
|
|||||||
address: 62,
|
address: 62,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 33,
|
opcode: 33,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -450,7 +413,6 @@ expression: diff.instruction_rows
|
|||||||
address: 64,
|
address: 64,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 36,
|
opcode: 36,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -464,7 +426,6 @@ expression: diff.instruction_rows
|
|||||||
address: 66,
|
address: 66,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 42,
|
opcode: 42,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -478,7 +439,6 @@ expression: diff.instruction_rows
|
|||||||
address: 68,
|
address: 68,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 44,
|
opcode: 44,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -492,9 +452,6 @@ expression: diff.instruction_rows
|
|||||||
address: 70,
|
address: 70,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 15,
|
opcode: 15,
|
||||||
branch_dest: Some(
|
|
||||||
212,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -513,7 +470,6 @@ expression: diff.instruction_rows
|
|||||||
address: 72,
|
address: 72,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 46,
|
opcode: 46,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -527,7 +483,6 @@ expression: diff.instruction_rows
|
|||||||
address: 74,
|
address: 74,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 17,
|
opcode: 17,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -541,7 +496,6 @@ expression: diff.instruction_rows
|
|||||||
address: 76,
|
address: 76,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 46,
|
opcode: 46,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -555,7 +509,6 @@ expression: diff.instruction_rows
|
|||||||
address: 78,
|
address: 78,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 54,
|
opcode: 54,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -569,7 +522,6 @@ expression: diff.instruction_rows
|
|||||||
address: 80,
|
address: 80,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 67,
|
opcode: 67,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -583,7 +535,6 @@ expression: diff.instruction_rows
|
|||||||
address: 82,
|
address: 82,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 36,
|
opcode: 36,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -597,7 +548,6 @@ expression: diff.instruction_rows
|
|||||||
address: 84,
|
address: 84,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 46,
|
opcode: 46,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -611,7 +561,6 @@ expression: diff.instruction_rows
|
|||||||
address: 86,
|
address: 86,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 7,
|
opcode: 7,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -625,7 +574,6 @@ expression: diff.instruction_rows
|
|||||||
address: 88,
|
address: 88,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 54,
|
opcode: 54,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -639,7 +587,6 @@ expression: diff.instruction_rows
|
|||||||
address: 90,
|
address: 90,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 67,
|
opcode: 67,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -653,7 +600,6 @@ expression: diff.instruction_rows
|
|||||||
address: 92,
|
address: 92,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 55,
|
opcode: 55,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -667,7 +613,6 @@ expression: diff.instruction_rows
|
|||||||
address: 94,
|
address: 94,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 34,
|
opcode: 34,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -688,7 +633,6 @@ expression: diff.instruction_rows
|
|||||||
address: 96,
|
address: 96,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 34,
|
opcode: 34,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -702,7 +646,6 @@ expression: diff.instruction_rows
|
|||||||
address: 98,
|
address: 98,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 4,
|
opcode: 4,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -716,7 +659,6 @@ expression: diff.instruction_rows
|
|||||||
address: 100,
|
address: 100,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 19,
|
opcode: 19,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -730,7 +672,6 @@ expression: diff.instruction_rows
|
|||||||
address: 104,
|
address: 104,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 66,
|
opcode: 66,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -744,7 +685,6 @@ expression: diff.instruction_rows
|
|||||||
address: 106,
|
address: 106,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 47,
|
opcode: 47,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -758,7 +698,6 @@ expression: diff.instruction_rows
|
|||||||
address: 108,
|
address: 108,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 19,
|
opcode: 19,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -772,7 +711,6 @@ expression: diff.instruction_rows
|
|||||||
address: 112,
|
address: 112,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 47,
|
opcode: 47,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -786,7 +724,6 @@ expression: diff.instruction_rows
|
|||||||
address: 114,
|
address: 114,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 6,
|
opcode: 6,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -800,7 +737,6 @@ expression: diff.instruction_rows
|
|||||||
address: 116,
|
address: 116,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 66,
|
opcode: 66,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -814,7 +750,6 @@ expression: diff.instruction_rows
|
|||||||
address: 118,
|
address: 118,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 35,
|
opcode: 35,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -828,7 +763,6 @@ expression: diff.instruction_rows
|
|||||||
address: 120,
|
address: 120,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 47,
|
opcode: 47,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -842,7 +776,6 @@ expression: diff.instruction_rows
|
|||||||
address: 122,
|
address: 122,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 47,
|
opcode: 47,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -856,7 +789,6 @@ expression: diff.instruction_rows
|
|||||||
address: 124,
|
address: 124,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 47,
|
opcode: 47,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -870,7 +802,6 @@ expression: diff.instruction_rows
|
|||||||
address: 126,
|
address: 126,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 19,
|
opcode: 19,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -884,7 +815,6 @@ expression: diff.instruction_rows
|
|||||||
address: 130,
|
address: 130,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 25,
|
opcode: 25,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -898,9 +828,6 @@ expression: diff.instruction_rows
|
|||||||
address: 132,
|
address: 132,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 15,
|
opcode: 15,
|
||||||
branch_dest: Some(
|
|
||||||
168,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -919,7 +846,6 @@ expression: diff.instruction_rows
|
|||||||
address: 134,
|
address: 134,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 47,
|
opcode: 47,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -933,7 +859,6 @@ expression: diff.instruction_rows
|
|||||||
address: 136,
|
address: 136,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 19,
|
opcode: 19,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -947,7 +872,6 @@ expression: diff.instruction_rows
|
|||||||
address: 140,
|
address: 140,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 47,
|
opcode: 47,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -961,7 +885,6 @@ expression: diff.instruction_rows
|
|||||||
address: 142,
|
address: 142,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 25,
|
opcode: 25,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -975,9 +898,6 @@ expression: diff.instruction_rows
|
|||||||
address: 144,
|
address: 144,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 15,
|
opcode: 15,
|
||||||
branch_dest: Some(
|
|
||||||
168,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -996,7 +916,6 @@ expression: diff.instruction_rows
|
|||||||
address: 146,
|
address: 146,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 34,
|
opcode: 34,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1010,7 +929,6 @@ expression: diff.instruction_rows
|
|||||||
address: 148,
|
address: 148,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 33,
|
opcode: 33,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1024,7 +942,6 @@ expression: diff.instruction_rows
|
|||||||
address: 150,
|
address: 150,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 36,
|
opcode: 36,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1038,7 +955,6 @@ expression: diff.instruction_rows
|
|||||||
address: 152,
|
address: 152,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 42,
|
opcode: 42,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1052,7 +968,6 @@ expression: diff.instruction_rows
|
|||||||
address: 154,
|
address: 154,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 44,
|
opcode: 44,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1066,9 +981,6 @@ expression: diff.instruction_rows
|
|||||||
address: 156,
|
address: 156,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 15,
|
opcode: 15,
|
||||||
branch_dest: Some(
|
|
||||||
168,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1087,7 +999,6 @@ expression: diff.instruction_rows
|
|||||||
address: 158,
|
address: 158,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 46,
|
opcode: 46,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1101,7 +1012,6 @@ expression: diff.instruction_rows
|
|||||||
address: 160,
|
address: 160,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 17,
|
opcode: 17,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1115,7 +1025,6 @@ expression: diff.instruction_rows
|
|||||||
address: 162,
|
address: 162,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 46,
|
opcode: 46,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1129,7 +1038,6 @@ expression: diff.instruction_rows
|
|||||||
address: 164,
|
address: 164,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 54,
|
opcode: 54,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1143,7 +1051,6 @@ expression: diff.instruction_rows
|
|||||||
address: 166,
|
address: 166,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 67,
|
opcode: 67,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1157,7 +1064,6 @@ expression: diff.instruction_rows
|
|||||||
address: 168,
|
address: 168,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 25,
|
opcode: 25,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1180,9 +1086,6 @@ expression: diff.instruction_rows
|
|||||||
address: 170,
|
address: 170,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 15,
|
opcode: 15,
|
||||||
branch_dest: Some(
|
|
||||||
200,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1201,7 +1104,6 @@ expression: diff.instruction_rows
|
|||||||
address: 172,
|
address: 172,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 35,
|
opcode: 35,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1215,7 +1117,6 @@ expression: diff.instruction_rows
|
|||||||
address: 174,
|
address: 174,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 25,
|
opcode: 25,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1229,9 +1130,6 @@ expression: diff.instruction_rows
|
|||||||
address: 176,
|
address: 176,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 15,
|
opcode: 15,
|
||||||
branch_dest: Some(
|
|
||||||
200,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1250,7 +1148,6 @@ expression: diff.instruction_rows
|
|||||||
address: 178,
|
address: 178,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 34,
|
opcode: 34,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1264,7 +1161,6 @@ expression: diff.instruction_rows
|
|||||||
address: 180,
|
address: 180,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 37,
|
opcode: 37,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1278,7 +1174,6 @@ expression: diff.instruction_rows
|
|||||||
address: 182,
|
address: 182,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 42,
|
opcode: 42,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1292,7 +1187,6 @@ expression: diff.instruction_rows
|
|||||||
address: 184,
|
address: 184,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 44,
|
opcode: 44,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1306,9 +1200,6 @@ expression: diff.instruction_rows
|
|||||||
address: 186,
|
address: 186,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 15,
|
opcode: 15,
|
||||||
branch_dest: Some(
|
|
||||||
200,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1327,7 +1218,6 @@ expression: diff.instruction_rows
|
|||||||
address: 188,
|
address: 188,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 32,
|
opcode: 32,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1341,7 +1231,6 @@ expression: diff.instruction_rows
|
|||||||
address: 190,
|
address: 190,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 34,
|
opcode: 34,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1355,7 +1244,6 @@ expression: diff.instruction_rows
|
|||||||
address: 192,
|
address: 192,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 46,
|
opcode: 46,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1369,7 +1257,6 @@ expression: diff.instruction_rows
|
|||||||
address: 194,
|
address: 194,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 46,
|
opcode: 46,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1383,7 +1270,6 @@ expression: diff.instruction_rows
|
|||||||
address: 196,
|
address: 196,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 19,
|
opcode: 19,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1397,7 +1283,6 @@ expression: diff.instruction_rows
|
|||||||
address: 200,
|
address: 200,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 34,
|
opcode: 34,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1420,7 +1305,6 @@ expression: diff.instruction_rows
|
|||||||
address: 202,
|
address: 202,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 35,
|
opcode: 35,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1434,7 +1318,6 @@ expression: diff.instruction_rows
|
|||||||
address: 204,
|
address: 204,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 34,
|
opcode: 34,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1448,7 +1331,6 @@ expression: diff.instruction_rows
|
|||||||
address: 206,
|
address: 206,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 4,
|
opcode: 4,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1462,7 +1344,6 @@ expression: diff.instruction_rows
|
|||||||
address: 208,
|
address: 208,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 19,
|
opcode: 19,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1476,7 +1357,6 @@ expression: diff.instruction_rows
|
|||||||
address: 212,
|
address: 212,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 7,
|
opcode: 7,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1499,7 +1379,6 @@ expression: diff.instruction_rows
|
|||||||
address: 214,
|
address: 214,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 55,
|
opcode: 55,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1513,7 +1392,6 @@ expression: diff.instruction_rows
|
|||||||
address: 216,
|
address: 216,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 65535,
|
opcode: 65535,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1527,7 +1405,6 @@ expression: diff.instruction_rows
|
|||||||
address: 220,
|
address: 220,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 65535,
|
opcode: 65535,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1541,7 +1418,6 @@ expression: diff.instruction_rows
|
|||||||
address: 224,
|
address: 224,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 65535,
|
opcode: 65535,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1555,7 +1431,6 @@ expression: diff.instruction_rows
|
|||||||
address: 228,
|
address: 228,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 65535,
|
opcode: 65535,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1569,7 +1444,6 @@ expression: diff.instruction_rows
|
|||||||
address: 232,
|
address: 232,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 65535,
|
opcode: 65535,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1583,7 +1457,6 @@ expression: diff.instruction_rows
|
|||||||
address: 236,
|
address: 236,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 65535,
|
opcode: 65535,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1597,7 +1470,6 @@ expression: diff.instruction_rows
|
|||||||
address: 240,
|
address: 240,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 65535,
|
opcode: 65535,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
source: objdiff-core/tests/arch_arm.rs
|
source: objdiff-core/tests/arch_arm.rs
|
||||||
assertion_line: 33
|
|
||||||
expression: output
|
expression: output
|
||||||
---
|
---
|
||||||
[(Line(37), Dim, 5), (Address(0), Normal, 5), (Spacing(4), Normal, 0), (Opcode("push", 56), Normal, 10), (Basic("{"), Normal, 0), (Argument(Opaque("r3")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r4")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r5")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r6")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r7")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("lr")), Normal, 0), (Basic("}"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(37), Dim, 5), (Address(0), Normal, 5), (Spacing(4), Normal, 0), (Opcode("push", 56), Normal, 10), (Basic("{"), Normal, 0), (Argument(Opaque("r3")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r4")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r5")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r6")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r7")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("lr")), Normal, 0), (Basic("}"), Normal, 0), (Eol, Normal, 0)]
|
||||||
@ -16,7 +15,7 @@ expression: output
|
|||||||
[(Line(44), Dim, 5), (Address(22), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldrh", 38), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r4")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(0)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(44), Dim, 5), (Address(22), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldrh", 38), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r4")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(0)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(44), Dim, 5), (Address(24), Normal, 5), (Spacing(4), Normal, 0), (Opcode("cmp", 25), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(164)), Normal, 0), (Eol, Normal, 0)]
|
[(Line(44), Dim, 5), (Address(24), Normal, 5), (Spacing(4), Normal, 0), (Opcode("cmp", 25), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(164)), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(44), Dim, 5), (Address(26), Normal, 5), (Spacing(4), Normal, 0), (Opcode("beq", 15), Normal, 10), (BranchDest(48), Normal, 0), (Basic(" ~>"), Rotating(1), 0), (Eol, Normal, 0)]
|
[(Line(44), Dim, 5), (Address(26), Normal, 5), (Spacing(4), Normal, 0), (Opcode("beq", 15), Normal, 10), (BranchDest(48), Normal, 0), (Basic(" ~>"), Rotating(1), 0), (Eol, Normal, 0)]
|
||||||
[(Line(44), Dim, 5), (Address(28), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 34), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(184)), Normal, 0), (Basic("]"), Normal, 0), (Basic(" (->"), Normal, 0), (BranchDest(216), Normal, 0), (Basic(")"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(44), Dim, 5), (Address(28), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 34), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(184)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(44), Dim, 5), (Address(30), Normal, 5), (Spacing(4), Normal, 0), (Opcode("cmp", 26), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Eol, Normal, 0)]
|
[(Line(44), Dim, 5), (Address(30), Normal, 5), (Spacing(4), Normal, 0), (Opcode("cmp", 26), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(44), Dim, 5), (Address(32), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bne", 15), Normal, 10), (BranchDest(94), Normal, 0), (Basic(" ~>"), Rotating(2), 0), (Eol, Normal, 0)]
|
[(Line(44), Dim, 5), (Address(32), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bne", 15), Normal, 10), (BranchDest(94), Normal, 0), (Basic(" ~>"), Rotating(2), 0), (Eol, Normal, 0)]
|
||||||
[(Line(47), Dim, 5), (Address(34), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 35), Normal, 10), (Argument(Opaque("r2")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("sp")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(4)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(47), Dim, 5), (Address(34), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 35), Normal, 10), (Argument(Opaque("r2")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("sp")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(4)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
@ -30,7 +29,7 @@ expression: output
|
|||||||
[(Line(50), Dim, 5), (Address(52), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bl", 19), Normal, 10), (Symbol(Symbol { name: "ServerEvent_CreateSubstitute", demangled_name: None, address: 0, size: 0, kind: Unknown, section: None, flags: FlagSet(Global), align: None, virtual_address: None }), Bright, 0), (Addend(-4), Bright, 0), (Eol, Normal, 0)]
|
[(Line(50), Dim, 5), (Address(52), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bl", 19), Normal, 10), (Symbol(Symbol { name: "ServerEvent_CreateSubstitute", demangled_name: None, address: 0, size: 0, kind: Unknown, section: None, flags: FlagSet(Global), align: None, virtual_address: None }), Bright, 0), (Addend(-4), Bright, 0), (Eol, Normal, 0)]
|
||||||
[(Line(50), Dim, 5), (Address(56), Normal, 5), (Spacing(4), Normal, 0), (Opcode("cmp", 25), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(0)), Normal, 0), (Eol, Normal, 0)]
|
[(Line(50), Dim, 5), (Address(56), Normal, 5), (Spacing(4), Normal, 0), (Opcode("cmp", 25), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(0)), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(50), Dim, 5), (Address(58), Normal, 5), (Spacing(4), Normal, 0), (Opcode("beq", 15), Normal, 10), (BranchDest(212), Normal, 0), (Basic(" ~>"), Rotating(0), 0), (Eol, Normal, 0)]
|
[(Line(50), Dim, 5), (Address(58), Normal, 5), (Spacing(4), Normal, 0), (Opcode("beq", 15), Normal, 10), (BranchDest(212), Normal, 0), (Basic(" ~>"), Rotating(0), 0), (Eol, Normal, 0)]
|
||||||
[(Line(52), Dim, 5), (Address(60), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 34), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(156)), Normal, 0), (Basic("]"), Normal, 0), (Basic(" (->"), Normal, 0), (BranchDest(220), Normal, 0), (Basic(")"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(52), Dim, 5), (Address(60), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 34), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(156)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(52), Dim, 5), (Address(62), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 33), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r5")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(52), Dim, 5), (Address(62), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 33), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r5")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(52), Dim, 5), (Address(64), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldrb", 36), Normal, 10), (Argument(Opaque("r2")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(5)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(52), Dim, 5), (Address(64), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldrb", 36), Normal, 10), (Argument(Opaque("r2")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(5)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(52), Dim, 5), (Address(66), Normal, 5), (Spacing(4), Normal, 0), (Opcode("lsl", 42), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r2")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(31)), Normal, 0), (Eol, Normal, 0)]
|
[(Line(52), Dim, 5), (Address(66), Normal, 5), (Spacing(4), Normal, 0), (Opcode("lsl", 42), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r2")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(31)), Normal, 0), (Eol, Normal, 0)]
|
||||||
@ -47,8 +46,8 @@ expression: output
|
|||||||
[(Line(52), Dim, 5), (Address(88), Normal, 5), (Spacing(4), Normal, 0), (Opcode("orr", 54), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r2")), Normal, 0), (Eol, Normal, 0)]
|
[(Line(52), Dim, 5), (Address(88), Normal, 5), (Spacing(4), Normal, 0), (Opcode("orr", 54), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r2")), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(52), Dim, 5), (Address(90), Normal, 5), (Spacing(4), Normal, 0), (Opcode("strb", 67), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(5)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(52), Dim, 5), (Address(90), Normal, 5), (Spacing(4), Normal, 0), (Opcode("strb", 67), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(5)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(86), Dim, 5), (Address(92), Normal, 5), (Spacing(4), Normal, 0), (Opcode("pop", 55), Normal, 10), (Basic("{"), Normal, 0), (Argument(Opaque("r3")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r4")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r5")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r6")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r7")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic("}"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(86), Dim, 5), (Address(92), Normal, 5), (Spacing(4), Normal, 0), (Opcode("pop", 55), Normal, 10), (Basic("{"), Normal, 0), (Argument(Opaque("r3")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r4")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r5")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r6")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r7")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic("}"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(57), Dim, 5), (Address(94), Normal, 5), (Basic(" ~> "), Rotating(2), 0), (Opcode("ldr", 34), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(128)), Normal, 0), (Basic("]"), Normal, 0), (Basic(" (->"), Normal, 0), (BranchDest(224), Normal, 0), (Basic(")"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(57), Dim, 5), (Address(94), Normal, 5), (Basic(" ~> "), Rotating(2), 0), (Opcode("ldr", 34), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(128)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(57), Dim, 5), (Address(96), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 34), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(128)), Normal, 0), (Basic("]"), Normal, 0), (Basic(" (->"), Normal, 0), (BranchDest(228), Normal, 0), (Basic(")"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(57), Dim, 5), (Address(96), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 34), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(128)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(57), Dim, 5), (Address(98), Normal, 5), (Spacing(4), Normal, 0), (Opcode("add", 4), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r5")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Eol, Normal, 0)]
|
[(Line(57), Dim, 5), (Address(98), Normal, 5), (Spacing(4), Normal, 0), (Opcode("add", 4), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r5")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(57), Dim, 5), (Address(100), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bl", 19), Normal, 10), (Symbol(Symbol { name: "HEManager_PushState", demangled_name: None, address: 0, size: 0, kind: Unknown, section: None, flags: FlagSet(Global), align: None, virtual_address: None }), Bright, 0), (Addend(-4), Bright, 0), (Eol, Normal, 0)]
|
[(Line(57), Dim, 5), (Address(100), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bl", 19), Normal, 10), (Symbol(Symbol { name: "HEManager_PushState", demangled_name: None, address: 0, size: 0, kind: Unknown, section: None, flags: FlagSet(Global), align: None, virtual_address: None }), Bright, 0), (Addend(-4), Bright, 0), (Eol, Normal, 0)]
|
||||||
[(Line(57), Dim, 5), (Address(104), Normal, 5), (Spacing(4), Normal, 0), (Opcode("str", 66), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("sp")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(8)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(57), Dim, 5), (Address(104), Normal, 5), (Spacing(4), Normal, 0), (Opcode("str", 66), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("sp")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(8)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
@ -69,7 +68,7 @@ expression: output
|
|||||||
[(Line(65), Dim, 5), (Address(140), Normal, 5), (Spacing(4), Normal, 0), (Opcode("mov", 47), Normal, 10), (Argument(Opaque("r7")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Eol, Normal, 0)]
|
[(Line(65), Dim, 5), (Address(140), Normal, 5), (Spacing(4), Normal, 0), (Opcode("mov", 47), Normal, 10), (Argument(Opaque("r7")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(66), Dim, 5), (Address(142), Normal, 5), (Spacing(4), Normal, 0), (Opcode("cmp", 25), Normal, 10), (Argument(Opaque("r7")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(2)), Normal, 0), (Eol, Normal, 0)]
|
[(Line(66), Dim, 5), (Address(142), Normal, 5), (Spacing(4), Normal, 0), (Opcode("cmp", 25), Normal, 10), (Argument(Opaque("r7")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(2)), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(66), Dim, 5), (Address(144), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bne", 15), Normal, 10), (BranchDest(168), Normal, 0), (Basic(" ~>"), Rotating(3), 0), (Eol, Normal, 0)]
|
[(Line(66), Dim, 5), (Address(144), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bne", 15), Normal, 10), (BranchDest(168), Normal, 0), (Basic(" ~>"), Rotating(3), 0), (Eol, Normal, 0)]
|
||||||
[(Line(68), Dim, 5), (Address(146), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 34), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(72)), Normal, 0), (Basic("]"), Normal, 0), (Basic(" (->"), Normal, 0), (BranchDest(220), Normal, 0), (Basic(")"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(68), Dim, 5), (Address(146), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 34), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(72)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(68), Dim, 5), (Address(148), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 33), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r5")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(68), Dim, 5), (Address(148), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 33), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r5")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(68), Dim, 5), (Address(150), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldrb", 36), Normal, 10), (Argument(Opaque("r2")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(5)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(68), Dim, 5), (Address(150), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldrb", 36), Normal, 10), (Argument(Opaque("r2")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(5)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(68), Dim, 5), (Address(152), Normal, 5), (Spacing(4), Normal, 0), (Opcode("lsl", 42), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r2")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(31)), Normal, 0), (Eol, Normal, 0)]
|
[(Line(68), Dim, 5), (Address(152), Normal, 5), (Spacing(4), Normal, 0), (Opcode("lsl", 42), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r2")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(31)), Normal, 0), (Eol, Normal, 0)]
|
||||||
@ -85,19 +84,19 @@ expression: output
|
|||||||
[(Line(75), Dim, 5), (Address(172), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 35), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("sp")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(12)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(75), Dim, 5), (Address(172), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 35), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("sp")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(12)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(75), Dim, 5), (Address(174), Normal, 5), (Spacing(4), Normal, 0), (Opcode("cmp", 25), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(0)), Normal, 0), (Eol, Normal, 0)]
|
[(Line(75), Dim, 5), (Address(174), Normal, 5), (Spacing(4), Normal, 0), (Opcode("cmp", 25), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(0)), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(75), Dim, 5), (Address(176), Normal, 5), (Spacing(4), Normal, 0), (Opcode("beq", 15), Normal, 10), (BranchDest(200), Normal, 0), (Basic(" ~>"), Rotating(4), 0), (Eol, Normal, 0)]
|
[(Line(75), Dim, 5), (Address(176), Normal, 5), (Spacing(4), Normal, 0), (Opcode("beq", 15), Normal, 10), (BranchDest(200), Normal, 0), (Basic(" ~>"), Rotating(4), 0), (Eol, Normal, 0)]
|
||||||
[(Line(75), Dim, 5), (Address(178), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 34), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(52)), Normal, 0), (Basic("]"), Normal, 0), (Basic(" (->"), Normal, 0), (BranchDest(232), Normal, 0), (Basic(")"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(75), Dim, 5), (Address(178), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 34), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(52)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(75), Dim, 5), (Address(180), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldrb", 37), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r5")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(75), Dim, 5), (Address(180), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldrb", 37), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r5")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(75), Dim, 5), (Address(182), Normal, 5), (Spacing(4), Normal, 0), (Opcode("lsl", 42), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(27)), Normal, 0), (Eol, Normal, 0)]
|
[(Line(75), Dim, 5), (Address(182), Normal, 5), (Spacing(4), Normal, 0), (Opcode("lsl", 42), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(27)), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(75), Dim, 5), (Address(184), Normal, 5), (Spacing(4), Normal, 0), (Opcode("lsr", 44), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(31)), Normal, 0), (Eol, Normal, 0)]
|
[(Line(75), Dim, 5), (Address(184), Normal, 5), (Spacing(4), Normal, 0), (Opcode("lsr", 44), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(31)), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(75), Dim, 5), (Address(186), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bne", 15), Normal, 10), (BranchDest(200), Normal, 0), (Basic(" ~>"), Rotating(4), 0), (Eol, Normal, 0)]
|
[(Line(75), Dim, 5), (Address(186), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bne", 15), Normal, 10), (BranchDest(200), Normal, 0), (Basic(" ~>"), Rotating(4), 0), (Eol, Normal, 0)]
|
||||||
[(Line(77), Dim, 5), (Address(188), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 32), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r5")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(12)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(77), Dim, 5), (Address(188), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 32), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("r5")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(12)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(77), Dim, 5), (Address(190), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 34), Normal, 10), (Argument(Opaque("r3")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(44)), Normal, 0), (Basic("]"), Normal, 0), (Basic(" (->"), Normal, 0), (BranchDest(236), Normal, 0), (Basic(")"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(77), Dim, 5), (Address(190), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 34), Normal, 10), (Argument(Opaque("r3")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(44)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(77), Dim, 5), (Address(192), Normal, 5), (Spacing(4), Normal, 0), (Opcode("mov", 46), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(90)), Normal, 0), (Eol, Normal, 0)]
|
[(Line(77), Dim, 5), (Address(192), Normal, 5), (Spacing(4), Normal, 0), (Opcode("mov", 46), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(90)), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(77), Dim, 5), (Address(194), Normal, 5), (Spacing(4), Normal, 0), (Opcode("mov", 46), Normal, 10), (Argument(Opaque("r2")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(71)), Normal, 0), (Eol, Normal, 0)]
|
[(Line(77), Dim, 5), (Address(194), Normal, 5), (Spacing(4), Normal, 0), (Opcode("mov", 46), Normal, 10), (Argument(Opaque("r2")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Unsigned(71)), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(77), Dim, 5), (Address(196), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bl", 19), Normal, 10), (Symbol(Symbol { name: "SCQUE_PUT_MsgImpl", demangled_name: None, address: 0, size: 0, kind: Unknown, section: None, flags: FlagSet(Global), align: None, virtual_address: None }), Bright, 0), (Addend(-4), Bright, 0), (Eol, Normal, 0)]
|
[(Line(77), Dim, 5), (Address(196), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bl", 19), Normal, 10), (Symbol(Symbol { name: "SCQUE_PUT_MsgImpl", demangled_name: None, address: 0, size: 0, kind: Unknown, section: None, flags: FlagSet(Global), align: None, virtual_address: None }), Bright, 0), (Addend(-4), Bright, 0), (Eol, Normal, 0)]
|
||||||
[(Line(81), Dim, 5), (Address(200), Normal, 5), (Basic(" ~> "), Rotating(4), 0), (Opcode("ldr", 34), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(20)), Normal, 0), (Basic("]"), Normal, 0), (Basic(" (->"), Normal, 0), (BranchDest(224), Normal, 0), (Basic(")"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(81), Dim, 5), (Address(200), Normal, 5), (Basic(" ~> "), Rotating(4), 0), (Opcode("ldr", 34), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(20)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(81), Dim, 5), (Address(202), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 35), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("sp")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(8)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(81), Dim, 5), (Address(202), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 35), Normal, 10), (Argument(Opaque("r1")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("sp")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(8)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(81), Dim, 5), (Address(204), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 34), Normal, 10), (Argument(Opaque("r2")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(32)), Normal, 0), (Basic("]"), Normal, 0), (Basic(" (->"), Normal, 0), (BranchDest(240), Normal, 0), (Basic(")"), Normal, 0), (Eol, Normal, 0)]
|
[(Line(81), Dim, 5), (Address(204), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ldr", 34), Normal, 10), (Argument(Opaque("r2")), Normal, 0), (Basic(", "), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("pc")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(32)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(81), Dim, 5), (Address(206), Normal, 5), (Spacing(4), Normal, 0), (Opcode("add", 4), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r5")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Eol, Normal, 0)]
|
[(Line(81), Dim, 5), (Address(206), Normal, 5), (Spacing(4), Normal, 0), (Opcode("add", 4), Normal, 10), (Argument(Opaque("r0")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r5")), Normal, 0), (Basic(", "), Normal, 0), (Argument(Opaque("r0")), Normal, 0), (Eol, Normal, 0)]
|
||||||
[(Line(81), Dim, 5), (Address(208), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bl", 19), Normal, 10), (Symbol(Symbol { name: "HEManager_PopState", demangled_name: None, address: 0, size: 0, kind: Unknown, section: None, flags: FlagSet(Global), align: None, virtual_address: None }), Bright, 0), (Addend(-4), Bright, 0), (Eol, Normal, 0)]
|
[(Line(81), Dim, 5), (Address(208), Normal, 5), (Spacing(4), Normal, 0), (Opcode("bl", 19), Normal, 10), (Symbol(Symbol { name: "HEManager_PopState", demangled_name: None, address: 0, size: 0, kind: Unknown, section: None, flags: FlagSet(Global), align: None, virtual_address: None }), Bright, 0), (Addend(-4), Bright, 0), (Eol, Normal, 0)]
|
||||||
[(Line(86), Dim, 5), (Address(212), Normal, 5), (Basic(" ~> "), Rotating(0), 0), (Opcode("add", 7), Normal, 10), (Argument(Opaque("sp")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(16)), Normal, 0), (Eol, Normal, 0)]
|
[(Line(86), Dim, 5), (Address(212), Normal, 5), (Basic(" ~> "), Rotating(0), 0), (Opcode("add", 7), Normal, 10), (Argument(Opaque("sp")), Normal, 0), (Basic(", "), Normal, 0), (Basic("#"), Normal, 0), (Argument(Signed(16)), Normal, 0), (Eol, Normal, 0)]
|
||||||
|
@ -3449,7 +3449,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: None,
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -3464,7 +3463,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: None,
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -3479,7 +3477,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: None,
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -3494,7 +3491,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: None,
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -3509,7 +3505,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: None,
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -3524,7 +3519,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: None,
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -3539,7 +3533,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: None,
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -3554,7 +3547,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: None,
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -3569,7 +3561,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: None,
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -3584,7 +3575,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: None,
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -3599,7 +3589,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: None,
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -3614,7 +3603,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: None,
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -3629,7 +3617,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: None,
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -3644,7 +3631,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: None,
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -3659,7 +3645,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: None,
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -3674,7 +3659,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: None,
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -3689,7 +3673,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: None,
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -3704,9 +3687,6 @@ Object {
|
|||||||
244,
|
244,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Elf(
|
flags: Elf(
|
||||||
@ -3817,7 +3797,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: None,
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
|
@ -9,7 +9,6 @@ expression: diff.instruction_rows
|
|||||||
address: 0,
|
address: 0,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 12,
|
opcode: 12,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -23,7 +22,6 @@ expression: diff.instruction_rows
|
|||||||
address: 4,
|
address: 4,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 44,
|
opcode: 44,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -37,7 +35,6 @@ expression: diff.instruction_rows
|
|||||||
address: 8,
|
address: 8,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 44,
|
opcode: 44,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -51,7 +48,6 @@ expression: diff.instruction_rows
|
|||||||
address: 12,
|
address: 12,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 44,
|
opcode: 44,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -65,7 +61,6 @@ expression: diff.instruction_rows
|
|||||||
address: 16,
|
address: 16,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 44,
|
opcode: 44,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -79,7 +74,6 @@ expression: diff.instruction_rows
|
|||||||
address: 20,
|
address: 20,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 2,
|
opcode: 2,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -93,7 +87,6 @@ expression: diff.instruction_rows
|
|||||||
address: 24,
|
address: 24,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 113,
|
opcode: 113,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -107,7 +100,6 @@ expression: diff.instruction_rows
|
|||||||
address: 28,
|
address: 28,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 26,
|
opcode: 26,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -121,7 +113,6 @@ expression: diff.instruction_rows
|
|||||||
address: 32,
|
address: 32,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 20,
|
opcode: 20,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -135,7 +126,6 @@ expression: diff.instruction_rows
|
|||||||
address: 36,
|
address: 36,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 97,
|
opcode: 97,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -149,7 +139,6 @@ expression: diff.instruction_rows
|
|||||||
address: 40,
|
address: 40,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 2,
|
opcode: 2,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -163,7 +152,6 @@ expression: diff.instruction_rows
|
|||||||
address: 44,
|
address: 44,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 12,
|
opcode: 12,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -177,7 +165,6 @@ expression: diff.instruction_rows
|
|||||||
address: 48,
|
address: 48,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 20,
|
opcode: 20,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -191,7 +178,6 @@ expression: diff.instruction_rows
|
|||||||
address: 52,
|
address: 52,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 26,
|
opcode: 26,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -205,7 +191,6 @@ expression: diff.instruction_rows
|
|||||||
address: 56,
|
address: 56,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 2,
|
opcode: 2,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -219,7 +204,6 @@ expression: diff.instruction_rows
|
|||||||
address: 60,
|
address: 60,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 12,
|
opcode: 12,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -233,7 +217,6 @@ expression: diff.instruction_rows
|
|||||||
address: 64,
|
address: 64,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 26,
|
opcode: 26,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -247,7 +230,6 @@ expression: diff.instruction_rows
|
|||||||
address: 68,
|
address: 68,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 97,
|
opcode: 97,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -261,7 +243,6 @@ expression: diff.instruction_rows
|
|||||||
address: 72,
|
address: 72,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 2,
|
opcode: 2,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -275,7 +256,6 @@ expression: diff.instruction_rows
|
|||||||
address: 76,
|
address: 76,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 97,
|
opcode: 97,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -289,7 +269,6 @@ expression: diff.instruction_rows
|
|||||||
address: 80,
|
address: 80,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 2,
|
opcode: 2,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -310,7 +289,6 @@ expression: diff.instruction_rows
|
|||||||
address: 84,
|
address: 84,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 97,
|
opcode: 97,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -324,9 +302,6 @@ expression: diff.instruction_rows
|
|||||||
address: 88,
|
address: 88,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 56,
|
opcode: 56,
|
||||||
branch_dest: Some(
|
|
||||||
80,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -345,7 +320,6 @@ expression: diff.instruction_rows
|
|||||||
address: 92,
|
address: 92,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 113,
|
opcode: 113,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -359,7 +333,6 @@ expression: diff.instruction_rows
|
|||||||
address: 96,
|
address: 96,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 2,
|
opcode: 2,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -373,7 +346,6 @@ expression: diff.instruction_rows
|
|||||||
address: 100,
|
address: 100,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 20,
|
opcode: 20,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -387,7 +359,6 @@ expression: diff.instruction_rows
|
|||||||
address: 104,
|
address: 104,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 2,
|
opcode: 2,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -401,7 +372,6 @@ expression: diff.instruction_rows
|
|||||||
address: 108,
|
address: 108,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 12,
|
opcode: 12,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -415,7 +385,6 @@ expression: diff.instruction_rows
|
|||||||
address: 112,
|
address: 112,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 2,
|
opcode: 2,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -429,7 +398,6 @@ expression: diff.instruction_rows
|
|||||||
address: 116,
|
address: 116,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 16,
|
opcode: 16,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -443,7 +411,6 @@ expression: diff.instruction_rows
|
|||||||
address: 120,
|
address: 120,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 20,
|
opcode: 20,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -457,7 +424,6 @@ expression: diff.instruction_rows
|
|||||||
address: 124,
|
address: 124,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 12,
|
opcode: 12,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -471,7 +437,6 @@ expression: diff.instruction_rows
|
|||||||
address: 128,
|
address: 128,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 2,
|
opcode: 2,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -494,7 +459,6 @@ expression: diff.instruction_rows
|
|||||||
address: 132,
|
address: 132,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 12,
|
opcode: 12,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -508,7 +472,6 @@ expression: diff.instruction_rows
|
|||||||
address: 136,
|
address: 136,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 2,
|
opcode: 2,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -522,7 +485,6 @@ expression: diff.instruction_rows
|
|||||||
address: 140,
|
address: 140,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 113,
|
opcode: 113,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -536,9 +498,6 @@ expression: diff.instruction_rows
|
|||||||
address: 144,
|
address: 144,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 55,
|
opcode: 55,
|
||||||
branch_dest: Some(
|
|
||||||
128,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -557,7 +516,6 @@ expression: diff.instruction_rows
|
|||||||
address: 148,
|
address: 148,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 90,
|
opcode: 90,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -571,9 +529,6 @@ expression: diff.instruction_rows
|
|||||||
address: 152,
|
address: 152,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 3,
|
opcode: 3,
|
||||||
branch_dest: Some(
|
|
||||||
128,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -592,7 +547,6 @@ expression: diff.instruction_rows
|
|||||||
address: 156,
|
address: 156,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 113,
|
opcode: 113,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -606,7 +560,6 @@ expression: diff.instruction_rows
|
|||||||
address: 160,
|
address: 160,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 2,
|
opcode: 2,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -620,7 +573,6 @@ expression: diff.instruction_rows
|
|||||||
address: 164,
|
address: 164,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 60,
|
opcode: 60,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -634,7 +586,6 @@ expression: diff.instruction_rows
|
|||||||
address: 168,
|
address: 168,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 77,
|
opcode: 77,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -648,7 +599,6 @@ expression: diff.instruction_rows
|
|||||||
address: 172,
|
address: 172,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 113,
|
opcode: 113,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -662,9 +612,6 @@ expression: diff.instruction_rows
|
|||||||
address: 176,
|
address: 176,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 54,
|
opcode: 54,
|
||||||
branch_dest: Some(
|
|
||||||
128,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -683,7 +630,6 @@ expression: diff.instruction_rows
|
|||||||
address: 180,
|
address: 180,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 113,
|
opcode: 113,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
|
@ -683,9 +683,6 @@ Object {
|
|||||||
632,
|
632,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
8,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Elf(
|
flags: Elf(
|
||||||
@ -1309,9 +1306,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1326,9 +1320,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1343,9 +1334,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1360,9 +1348,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1377,9 +1362,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1394,9 +1376,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1411,9 +1390,6 @@ Object {
|
|||||||
43,
|
43,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
8,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1428,9 +1404,6 @@ Object {
|
|||||||
76,
|
76,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
8,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1445,9 +1418,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1462,9 +1432,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1479,9 +1446,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -317,9 +317,6 @@ Object {
|
|||||||
552,
|
552,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Elf(
|
flags: Elf(
|
||||||
@ -343,9 +340,6 @@ Object {
|
|||||||
40,
|
40,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Elf(
|
flags: Elf(
|
||||||
@ -369,9 +363,6 @@ Object {
|
|||||||
36,
|
36,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Elf(
|
flags: Elf(
|
||||||
@ -435,9 +426,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -452,9 +440,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -469,9 +454,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -486,9 +468,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -503,9 +482,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -520,9 +496,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -537,9 +510,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
|
@ -9,7 +9,6 @@ expression: diff.instruction_rows
|
|||||||
address: 0,
|
address: 0,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 60,
|
opcode: 60,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -23,7 +22,6 @@ expression: diff.instruction_rows
|
|||||||
address: 4,
|
address: 4,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 38,
|
opcode: 38,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -37,9 +35,6 @@ expression: diff.instruction_rows
|
|||||||
address: 8,
|
address: 8,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 43,
|
opcode: 43,
|
||||||
branch_dest: Some(
|
|
||||||
20,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -58,7 +53,6 @@ expression: diff.instruction_rows
|
|||||||
address: 12,
|
address: 12,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 41,
|
opcode: 41,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -72,9 +66,6 @@ expression: diff.instruction_rows
|
|||||||
address: 16,
|
address: 16,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 45,
|
opcode: 45,
|
||||||
branch_dest: Some(
|
|
||||||
32,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -93,7 +84,6 @@ expression: diff.instruction_rows
|
|||||||
address: 20,
|
address: 20,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 42,
|
opcode: 42,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -114,7 +104,6 @@ expression: diff.instruction_rows
|
|||||||
address: 24,
|
address: 24,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 41,
|
opcode: 41,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -128,7 +117,6 @@ expression: diff.instruction_rows
|
|||||||
address: 28,
|
address: 28,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 94,
|
opcode: 94,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -142,7 +130,6 @@ expression: diff.instruction_rows
|
|||||||
address: 32,
|
address: 32,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 60,
|
opcode: 60,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -163,7 +150,6 @@ expression: diff.instruction_rows
|
|||||||
address: 36,
|
address: 36,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 166,
|
opcode: 166,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -177,7 +163,6 @@ expression: diff.instruction_rows
|
|||||||
address: 40,
|
address: 40,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 38,
|
opcode: 38,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -191,9 +176,6 @@ expression: diff.instruction_rows
|
|||||||
address: 44,
|
address: 44,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 43,
|
opcode: 43,
|
||||||
branch_dest: Some(
|
|
||||||
56,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -212,7 +194,6 @@ expression: diff.instruction_rows
|
|||||||
address: 48,
|
address: 48,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 41,
|
opcode: 41,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -226,9 +207,6 @@ expression: diff.instruction_rows
|
|||||||
address: 52,
|
address: 52,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 45,
|
opcode: 45,
|
||||||
branch_dest: Some(
|
|
||||||
68,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -247,7 +225,6 @@ expression: diff.instruction_rows
|
|||||||
address: 56,
|
address: 56,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 42,
|
opcode: 42,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -268,7 +245,6 @@ expression: diff.instruction_rows
|
|||||||
address: 60,
|
address: 60,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 41,
|
opcode: 41,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -282,7 +258,6 @@ expression: diff.instruction_rows
|
|||||||
address: 64,
|
address: 64,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 94,
|
opcode: 94,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -296,7 +271,6 @@ expression: diff.instruction_rows
|
|||||||
address: 68,
|
address: 68,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 60,
|
opcode: 60,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -317,7 +291,6 @@ expression: diff.instruction_rows
|
|||||||
address: 72,
|
address: 72,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 41,
|
opcode: 41,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -331,7 +304,6 @@ expression: diff.instruction_rows
|
|||||||
address: 76,
|
address: 76,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 38,
|
opcode: 38,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -345,7 +317,6 @@ expression: diff.instruction_rows
|
|||||||
address: 80,
|
address: 80,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 166,
|
opcode: 166,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -359,9 +330,6 @@ expression: diff.instruction_rows
|
|||||||
address: 84,
|
address: 84,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 43,
|
opcode: 43,
|
||||||
branch_dest: Some(
|
|
||||||
96,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -380,7 +348,6 @@ expression: diff.instruction_rows
|
|||||||
address: 88,
|
address: 88,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 41,
|
opcode: 41,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -394,9 +361,6 @@ expression: diff.instruction_rows
|
|||||||
address: 92,
|
address: 92,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 45,
|
opcode: 45,
|
||||||
branch_dest: Some(
|
|
||||||
108,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -415,7 +379,6 @@ expression: diff.instruction_rows
|
|||||||
address: 96,
|
address: 96,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 42,
|
opcode: 42,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -436,7 +399,6 @@ expression: diff.instruction_rows
|
|||||||
address: 100,
|
address: 100,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 41,
|
opcode: 41,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -450,7 +412,6 @@ expression: diff.instruction_rows
|
|||||||
address: 104,
|
address: 104,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 94,
|
opcode: 94,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -464,7 +425,6 @@ expression: diff.instruction_rows
|
|||||||
address: 108,
|
address: 108,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 60,
|
opcode: 60,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -485,7 +445,6 @@ expression: diff.instruction_rows
|
|||||||
address: 112,
|
address: 112,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 41,
|
opcode: 41,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -499,7 +458,6 @@ expression: diff.instruction_rows
|
|||||||
address: 116,
|
address: 116,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 38,
|
opcode: 38,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -513,7 +471,6 @@ expression: diff.instruction_rows
|
|||||||
address: 120,
|
address: 120,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 166,
|
opcode: 166,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -527,9 +484,6 @@ expression: diff.instruction_rows
|
|||||||
address: 124,
|
address: 124,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 43,
|
opcode: 43,
|
||||||
branch_dest: Some(
|
|
||||||
136,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -548,7 +502,6 @@ expression: diff.instruction_rows
|
|||||||
address: 128,
|
address: 128,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 41,
|
opcode: 41,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -562,9 +515,6 @@ expression: diff.instruction_rows
|
|||||||
address: 132,
|
address: 132,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 45,
|
opcode: 45,
|
||||||
branch_dest: Some(
|
|
||||||
148,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -583,7 +533,6 @@ expression: diff.instruction_rows
|
|||||||
address: 136,
|
address: 136,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 42,
|
opcode: 42,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -604,7 +553,6 @@ expression: diff.instruction_rows
|
|||||||
address: 140,
|
address: 140,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 41,
|
opcode: 41,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -618,7 +566,6 @@ expression: diff.instruction_rows
|
|||||||
address: 144,
|
address: 144,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 94,
|
opcode: 94,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -632,7 +579,6 @@ expression: diff.instruction_rows
|
|||||||
address: 148,
|
address: 148,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 41,
|
opcode: 41,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -653,7 +599,6 @@ expression: diff.instruction_rows
|
|||||||
address: 152,
|
address: 152,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 41,
|
opcode: 41,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -667,7 +612,6 @@ expression: diff.instruction_rows
|
|||||||
address: 156,
|
address: 156,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 166,
|
opcode: 166,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -681,7 +625,6 @@ expression: diff.instruction_rows
|
|||||||
address: 160,
|
address: 160,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 42,
|
opcode: 42,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -695,7 +638,6 @@ expression: diff.instruction_rows
|
|||||||
address: 164,
|
address: 164,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 41,
|
opcode: 41,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -709,7 +651,6 @@ expression: diff.instruction_rows
|
|||||||
address: 168,
|
address: 168,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 166,
|
opcode: 166,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -723,7 +664,6 @@ expression: diff.instruction_rows
|
|||||||
address: 172,
|
address: 172,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 41,
|
opcode: 41,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -737,7 +677,6 @@ expression: diff.instruction_rows
|
|||||||
address: 176,
|
address: 176,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 162,
|
opcode: 162,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -751,7 +690,6 @@ expression: diff.instruction_rows
|
|||||||
address: 180,
|
address: 180,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 94,
|
opcode: 94,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -765,7 +703,6 @@ expression: diff.instruction_rows
|
|||||||
address: 184,
|
address: 184,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 66,
|
opcode: 66,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -779,9 +716,6 @@ expression: diff.instruction_rows
|
|||||||
address: 188,
|
address: 188,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 43,
|
opcode: 43,
|
||||||
branch_dest: Some(
|
|
||||||
196,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -800,7 +734,6 @@ expression: diff.instruction_rows
|
|||||||
address: 192,
|
address: 192,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 166,
|
opcode: 166,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -814,7 +747,6 @@ expression: diff.instruction_rows
|
|||||||
address: 196,
|
address: 196,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 163,
|
opcode: 163,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -835,7 +767,6 @@ expression: diff.instruction_rows
|
|||||||
address: 200,
|
address: 200,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 94,
|
opcode: 94,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -849,7 +780,6 @@ expression: diff.instruction_rows
|
|||||||
address: 204,
|
address: 204,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 66,
|
opcode: 66,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -863,9 +793,6 @@ expression: diff.instruction_rows
|
|||||||
address: 208,
|
address: 208,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 43,
|
opcode: 43,
|
||||||
branch_dest: Some(
|
|
||||||
216,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -884,7 +811,6 @@ expression: diff.instruction_rows
|
|||||||
address: 212,
|
address: 212,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 166,
|
opcode: 166,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -898,7 +824,6 @@ expression: diff.instruction_rows
|
|||||||
address: 216,
|
address: 216,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 163,
|
opcode: 163,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -919,7 +844,6 @@ expression: diff.instruction_rows
|
|||||||
address: 220,
|
address: 220,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 94,
|
opcode: 94,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -933,7 +857,6 @@ expression: diff.instruction_rows
|
|||||||
address: 224,
|
address: 224,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 66,
|
opcode: 66,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -947,9 +870,6 @@ expression: diff.instruction_rows
|
|||||||
address: 228,
|
address: 228,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 43,
|
opcode: 43,
|
||||||
branch_dest: Some(
|
|
||||||
236,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -968,7 +888,6 @@ expression: diff.instruction_rows
|
|||||||
address: 232,
|
address: 232,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 166,
|
opcode: 166,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -982,7 +901,6 @@ expression: diff.instruction_rows
|
|||||||
address: 236,
|
address: 236,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 163,
|
opcode: 163,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1003,7 +921,6 @@ expression: diff.instruction_rows
|
|||||||
address: 240,
|
address: 240,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 94,
|
opcode: 94,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1017,7 +934,6 @@ expression: diff.instruction_rows
|
|||||||
address: 244,
|
address: 244,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 66,
|
opcode: 66,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1031,9 +947,6 @@ expression: diff.instruction_rows
|
|||||||
address: 248,
|
address: 248,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 43,
|
opcode: 43,
|
||||||
branch_dest: Some(
|
|
||||||
256,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1052,7 +965,6 @@ expression: diff.instruction_rows
|
|||||||
address: 252,
|
address: 252,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 166,
|
opcode: 166,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1066,7 +978,6 @@ expression: diff.instruction_rows
|
|||||||
address: 256,
|
address: 256,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 41,
|
opcode: 41,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -1087,7 +998,6 @@ expression: diff.instruction_rows
|
|||||||
address: 260,
|
address: 260,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 47,
|
opcode: 47,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
source: objdiff-core/tests/arch_ppc.rs
|
source: objdiff-core/tests/arch_ppc.rs
|
||||||
|
assertion_line: 14
|
||||||
expression: obj
|
expression: obj
|
||||||
---
|
---
|
||||||
Object {
|
Object {
|
||||||
@ -166,9 +167,6 @@ Object {
|
|||||||
284,
|
284,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Elf(
|
flags: Elf(
|
||||||
@ -394,9 +392,6 @@ Object {
|
|||||||
4,
|
4,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Elf(
|
flags: Elf(
|
||||||
@ -422,9 +417,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
8,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: Some(
|
virtual_address: Some(
|
||||||
@ -441,9 +433,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -458,9 +447,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -475,9 +461,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -492,9 +475,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -509,9 +489,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -526,9 +503,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -543,9 +517,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
|
@ -9,7 +9,6 @@ expression: diff.instruction_rows
|
|||||||
address: 0,
|
address: 0,
|
||||||
size: 1,
|
size: 1,
|
||||||
opcode: 640,
|
opcode: 640,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -23,7 +22,6 @@ expression: diff.instruction_rows
|
|||||||
address: 1,
|
address: 1,
|
||||||
size: 2,
|
size: 2,
|
||||||
opcode: 414,
|
opcode: 414,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -37,7 +35,6 @@ expression: diff.instruction_rows
|
|||||||
address: 3,
|
address: 3,
|
||||||
size: 5,
|
size: 5,
|
||||||
opcode: 640,
|
opcode: 640,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -51,7 +48,6 @@ expression: diff.instruction_rows
|
|||||||
address: 8,
|
address: 8,
|
||||||
size: 5,
|
size: 5,
|
||||||
opcode: 59,
|
opcode: 59,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -65,7 +61,6 @@ expression: diff.instruction_rows
|
|||||||
address: 13,
|
address: 13,
|
||||||
size: 3,
|
size: 3,
|
||||||
opcode: 7,
|
opcode: 7,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -79,7 +74,6 @@ expression: diff.instruction_rows
|
|||||||
address: 16,
|
address: 16,
|
||||||
size: 1,
|
size: 1,
|
||||||
opcode: 590,
|
opcode: 590,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -93,7 +87,6 @@ expression: diff.instruction_rows
|
|||||||
address: 17,
|
address: 17,
|
||||||
size: 1,
|
size: 1,
|
||||||
opcode: 662,
|
opcode: 662,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
|
@ -136,9 +136,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -153,9 +150,6 @@ Object {
|
|||||||
10,
|
10,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Coff(
|
flags: Coff(
|
||||||
@ -179,9 +173,6 @@ Object {
|
|||||||
18,
|
18,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
16,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Coff(
|
flags: Coff(
|
||||||
|
@ -9,7 +9,6 @@ expression: diff.instruction_rows
|
|||||||
address: 0,
|
address: 0,
|
||||||
size: 5,
|
size: 5,
|
||||||
opcode: 414,
|
opcode: 414,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -23,7 +22,6 @@ expression: diff.instruction_rows
|
|||||||
address: 5,
|
address: 5,
|
||||||
size: 5,
|
size: 5,
|
||||||
opcode: 414,
|
opcode: 414,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -37,7 +35,6 @@ expression: diff.instruction_rows
|
|||||||
address: 10,
|
address: 10,
|
||||||
size: 1,
|
size: 1,
|
||||||
opcode: 640,
|
opcode: 640,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -51,7 +48,6 @@ expression: diff.instruction_rows
|
|||||||
address: 11,
|
address: 11,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 740,
|
opcode: 740,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -65,7 +61,6 @@ expression: diff.instruction_rows
|
|||||||
address: 15,
|
address: 15,
|
||||||
size: 5,
|
size: 5,
|
||||||
opcode: 414,
|
opcode: 414,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -79,7 +74,6 @@ expression: diff.instruction_rows
|
|||||||
address: 20,
|
address: 20,
|
||||||
size: 5,
|
size: 5,
|
||||||
opcode: 414,
|
opcode: 414,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -93,7 +87,6 @@ expression: diff.instruction_rows
|
|||||||
address: 25,
|
address: 25,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 448,
|
opcode: 448,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -107,7 +100,6 @@ expression: diff.instruction_rows
|
|||||||
address: 29,
|
address: 29,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 460,
|
opcode: 460,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -121,7 +113,6 @@ expression: diff.instruction_rows
|
|||||||
address: 33,
|
address: 33,
|
||||||
size: 5,
|
size: 5,
|
||||||
opcode: 414,
|
opcode: 414,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -135,7 +126,6 @@ expression: diff.instruction_rows
|
|||||||
address: 38,
|
address: 38,
|
||||||
size: 5,
|
size: 5,
|
||||||
opcode: 414,
|
opcode: 414,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -149,7 +139,6 @@ expression: diff.instruction_rows
|
|||||||
address: 43,
|
address: 43,
|
||||||
size: 5,
|
size: 5,
|
||||||
opcode: 448,
|
opcode: 448,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -163,7 +152,6 @@ expression: diff.instruction_rows
|
|||||||
address: 48,
|
address: 48,
|
||||||
size: 5,
|
size: 5,
|
||||||
opcode: 460,
|
opcode: 460,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -177,7 +165,6 @@ expression: diff.instruction_rows
|
|||||||
address: 53,
|
address: 53,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 11,
|
opcode: 11,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -191,7 +178,6 @@ expression: diff.instruction_rows
|
|||||||
address: 57,
|
address: 57,
|
||||||
size: 5,
|
size: 5,
|
||||||
opcode: 414,
|
opcode: 414,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -205,7 +191,6 @@ expression: diff.instruction_rows
|
|||||||
address: 62,
|
address: 62,
|
||||||
size: 5,
|
size: 5,
|
||||||
opcode: 414,
|
opcode: 414,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -219,7 +204,6 @@ expression: diff.instruction_rows
|
|||||||
address: 67,
|
address: 67,
|
||||||
size: 5,
|
size: 5,
|
||||||
opcode: 448,
|
opcode: 448,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -233,7 +217,6 @@ expression: diff.instruction_rows
|
|||||||
address: 72,
|
address: 72,
|
||||||
size: 5,
|
size: 5,
|
||||||
opcode: 460,
|
opcode: 460,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -247,7 +230,6 @@ expression: diff.instruction_rows
|
|||||||
address: 77,
|
address: 77,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 11,
|
opcode: 11,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -261,7 +243,6 @@ expression: diff.instruction_rows
|
|||||||
address: 81,
|
address: 81,
|
||||||
size: 4,
|
size: 4,
|
||||||
opcode: 7,
|
opcode: 7,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -275,7 +256,6 @@ expression: diff.instruction_rows
|
|||||||
address: 85,
|
address: 85,
|
||||||
size: 1,
|
size: 1,
|
||||||
opcode: 590,
|
opcode: 590,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
@ -289,7 +269,6 @@ expression: diff.instruction_rows
|
|||||||
address: 86,
|
address: 86,
|
||||||
size: 1,
|
size: 1,
|
||||||
opcode: 662,
|
opcode: 662,
|
||||||
branch_dest: None,
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
|
@ -866,9 +866,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -883,9 +880,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -900,9 +894,6 @@ Object {
|
|||||||
429,
|
429,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
16,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Coff(
|
flags: Coff(
|
||||||
@ -1038,9 +1029,6 @@ Object {
|
|||||||
141,
|
141,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
16,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1055,9 +1043,6 @@ Object {
|
|||||||
87,
|
87,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
16,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1072,9 +1057,6 @@ Object {
|
|||||||
105,
|
105,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
16,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1089,9 +1071,6 @@ Object {
|
|||||||
82,
|
82,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
16,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1106,9 +1085,6 @@ Object {
|
|||||||
8,
|
8,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1123,9 +1099,6 @@ Object {
|
|||||||
12,
|
12,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Coff(
|
flags: Coff(
|
||||||
@ -1165,9 +1138,6 @@ Object {
|
|||||||
8,
|
8,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1182,9 +1152,6 @@ Object {
|
|||||||
12,
|
12,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Coff(
|
flags: Coff(
|
||||||
@ -1224,9 +1191,6 @@ Object {
|
|||||||
8,
|
8,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1241,9 +1205,6 @@ Object {
|
|||||||
12,
|
12,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Coff(
|
flags: Coff(
|
||||||
@ -1283,9 +1244,6 @@ Object {
|
|||||||
8,
|
8,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1300,9 +1258,6 @@ Object {
|
|||||||
12,
|
12,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Coff(
|
flags: Coff(
|
||||||
@ -1342,9 +1297,6 @@ Object {
|
|||||||
256,
|
256,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
16,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Coff(
|
flags: Coff(
|
||||||
@ -1392,9 +1344,6 @@ Object {
|
|||||||
20,
|
20,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Coff(
|
flags: Coff(
|
||||||
@ -1418,9 +1367,6 @@ Object {
|
|||||||
12,
|
12,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Coff(
|
flags: Coff(
|
||||||
@ -1460,9 +1406,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1477,9 +1420,6 @@ Object {
|
|||||||
8,
|
8,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
8,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Coff(
|
flags: Coff(
|
||||||
@ -1503,9 +1443,6 @@ Object {
|
|||||||
8,
|
8,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
8,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Coff(
|
flags: Coff(
|
||||||
@ -1529,9 +1466,6 @@ Object {
|
|||||||
4,
|
4,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1546,9 +1480,6 @@ Object {
|
|||||||
4,
|
4,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1563,9 +1494,6 @@ Object {
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
16,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
|
@ -13,9 +13,6 @@ expression: obj.sections
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -30,9 +27,6 @@ expression: obj.sections
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -42,14 +36,11 @@ expression: obj.sections
|
|||||||
name: ".rdata",
|
name: ".rdata",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -59,14 +50,11 @@ expression: obj.sections
|
|||||||
name: ".rdata",
|
name: ".rdata",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -76,14 +64,11 @@ expression: obj.sections
|
|||||||
name: ".text$mn",
|
name: ".text$mn",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Code,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
16,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -98,9 +83,6 @@ expression: obj.sections
|
|||||||
56,
|
56,
|
||||||
),
|
),
|
||||||
flags: FlagSet(Combined),
|
flags: FlagSet(Combined),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Coff(
|
flags: Coff(
|
||||||
@ -150,15 +132,12 @@ expression: obj.sections
|
|||||||
id: ".rdata-combined",
|
id: ".rdata-combined",
|
||||||
name: ".rdata",
|
name: ".rdata",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 304,
|
size: 295,
|
||||||
kind: Data,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
304,
|
295,
|
||||||
),
|
),
|
||||||
flags: FlagSet(Combined),
|
flags: FlagSet(Combined),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Coff(
|
flags: Coff(
|
||||||
@ -180,7 +159,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 24,
|
address: 21,
|
||||||
target_symbol: 13,
|
target_symbol: 13,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -188,7 +167,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 48,
|
address: 45,
|
||||||
target_symbol: 15,
|
target_symbol: 15,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -196,7 +175,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 64,
|
address: 61,
|
||||||
target_symbol: 25,
|
target_symbol: 25,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -204,7 +183,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 68,
|
address: 65,
|
||||||
target_symbol: 27,
|
target_symbol: 27,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -212,7 +191,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 76,
|
address: 70,
|
||||||
target_symbol: 21,
|
target_symbol: 21,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -220,7 +199,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 100,
|
address: 94,
|
||||||
target_symbol: 23,
|
target_symbol: 23,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -228,7 +207,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 116,
|
address: 110,
|
||||||
target_symbol: 31,
|
target_symbol: 31,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -236,7 +215,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 120,
|
address: 114,
|
||||||
target_symbol: 33,
|
target_symbol: 33,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -244,7 +223,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 136,
|
address: 130,
|
||||||
target_symbol: 35,
|
target_symbol: 35,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -252,7 +231,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 140,
|
address: 134,
|
||||||
target_symbol: 37,
|
target_symbol: 37,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -260,7 +239,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 144,
|
address: 138,
|
||||||
target_symbol: 19,
|
target_symbol: 19,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -268,7 +247,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 148,
|
address: 142,
|
||||||
target_symbol: 39,
|
target_symbol: 39,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -276,7 +255,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 156,
|
address: 147,
|
||||||
target_symbol: 31,
|
target_symbol: 31,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -284,7 +263,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 180,
|
address: 171,
|
||||||
target_symbol: 33,
|
target_symbol: 33,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -292,7 +271,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 184,
|
address: 175,
|
||||||
target_symbol: 21,
|
target_symbol: 21,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -300,7 +279,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 208,
|
address: 199,
|
||||||
target_symbol: 23,
|
target_symbol: 23,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -308,7 +287,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 224,
|
address: 215,
|
||||||
target_symbol: 31,
|
target_symbol: 31,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -316,7 +295,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 228,
|
address: 219,
|
||||||
target_symbol: 33,
|
target_symbol: 33,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -324,7 +303,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 244,
|
address: 235,
|
||||||
target_symbol: 13,
|
target_symbol: 13,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -332,7 +311,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 248,
|
address: 239,
|
||||||
target_symbol: 15,
|
target_symbol: 15,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -340,7 +319,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 264,
|
address: 255,
|
||||||
target_symbol: 21,
|
target_symbol: 21,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -348,7 +327,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 268,
|
address: 259,
|
||||||
target_symbol: 23,
|
target_symbol: 23,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -356,7 +335,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 272,
|
address: 263,
|
||||||
target_symbol: 29,
|
target_symbol: 29,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -364,7 +343,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 276,
|
address: 267,
|
||||||
target_symbol: 11,
|
target_symbol: 11,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -372,7 +351,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 280,
|
address: 271,
|
||||||
target_symbol: 43,
|
target_symbol: 43,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -380,7 +359,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 284,
|
address: 275,
|
||||||
target_symbol: 41,
|
target_symbol: 41,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -388,7 +367,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 288,
|
address: 279,
|
||||||
target_symbol: 70,
|
target_symbol: 70,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -396,7 +375,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 292,
|
address: 283,
|
||||||
target_symbol: 56,
|
target_symbol: 56,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -404,7 +383,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 296,
|
address: 287,
|
||||||
target_symbol: 72,
|
target_symbol: 72,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -412,7 +391,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 300,
|
address: 291,
|
||||||
target_symbol: 59,
|
target_symbol: 59,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -425,14 +404,11 @@ expression: obj.sections
|
|||||||
name: ".rdata$r",
|
name: ".rdata$r",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -442,14 +418,11 @@ expression: obj.sections
|
|||||||
name: ".rdata$r",
|
name: ".rdata$r",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -459,14 +432,11 @@ expression: obj.sections
|
|||||||
name: ".data$rs",
|
name: ".data$rs",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -476,14 +446,11 @@ expression: obj.sections
|
|||||||
name: ".rdata$r",
|
name: ".rdata$r",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -493,14 +460,11 @@ expression: obj.sections
|
|||||||
name: ".rdata$r",
|
name: ".rdata$r",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -510,14 +474,11 @@ expression: obj.sections
|
|||||||
name: ".rdata$r",
|
name: ".rdata$r",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -527,14 +488,11 @@ expression: obj.sections
|
|||||||
name: ".rdata$r",
|
name: ".rdata$r",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -544,14 +502,11 @@ expression: obj.sections
|
|||||||
name: ".data$rs",
|
name: ".data$rs",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -561,14 +516,11 @@ expression: obj.sections
|
|||||||
name: ".rdata$r",
|
name: ".rdata$r",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -578,14 +530,11 @@ expression: obj.sections
|
|||||||
name: ".rdata$r",
|
name: ".rdata$r",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -595,14 +544,11 @@ expression: obj.sections
|
|||||||
name: ".rdata$r",
|
name: ".rdata$r",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -612,14 +558,11 @@ expression: obj.sections
|
|||||||
name: ".rdata$r",
|
name: ".rdata$r",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -629,14 +572,11 @@ expression: obj.sections
|
|||||||
name: ".text$mn",
|
name: ".text$mn",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Code,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -646,14 +586,11 @@ expression: obj.sections
|
|||||||
name: ".rdata$r",
|
name: ".rdata$r",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -663,14 +600,11 @@ expression: obj.sections
|
|||||||
name: ".text$mn",
|
name: ".text$mn",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Code,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
16,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -680,14 +614,11 @@ expression: obj.sections
|
|||||||
name: ".text$mn",
|
name: ".text$mn",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Code,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
16,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -697,14 +628,11 @@ expression: obj.sections
|
|||||||
name: ".text$mn",
|
name: ".text$mn",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Code,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
16,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -714,14 +642,11 @@ expression: obj.sections
|
|||||||
name: ".text$mn",
|
name: ".text$mn",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Code,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
16,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -731,14 +656,11 @@ expression: obj.sections
|
|||||||
name: ".text$mn",
|
name: ".text$mn",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Code,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
16,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -747,15 +669,12 @@ expression: obj.sections
|
|||||||
id: ".text-combined",
|
id: ".text-combined",
|
||||||
name: ".text",
|
name: ".text",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 320,
|
size: 268,
|
||||||
kind: Code,
|
kind: Code,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
320,
|
268,
|
||||||
),
|
),
|
||||||
flags: FlagSet(Combined),
|
flags: FlagSet(Combined),
|
||||||
align: Some(
|
|
||||||
16,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Coff(
|
flags: Coff(
|
||||||
@ -777,7 +696,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
20,
|
20,
|
||||||
),
|
),
|
||||||
address: 43,
|
address: 29,
|
||||||
target_symbol: 60,
|
target_symbol: 60,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -785,7 +704,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
20,
|
20,
|
||||||
),
|
),
|
||||||
address: 62,
|
address: 48,
|
||||||
target_symbol: 52,
|
target_symbol: 52,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -793,7 +712,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
20,
|
20,
|
||||||
),
|
),
|
||||||
address: 84,
|
address: 68,
|
||||||
target_symbol: 11,
|
target_symbol: 11,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -801,7 +720,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 100,
|
address: 84,
|
||||||
target_symbol: 64,
|
target_symbol: 64,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -809,7 +728,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 124,
|
address: 104,
|
||||||
target_symbol: 66,
|
target_symbol: 66,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -817,7 +736,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 156,
|
address: 124,
|
||||||
target_symbol: 6,
|
target_symbol: 6,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -825,7 +744,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 166,
|
address: 134,
|
||||||
target_symbol: 8,
|
target_symbol: 8,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -833,7 +752,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
20,
|
20,
|
||||||
),
|
),
|
||||||
address: 177,
|
address: 145,
|
||||||
target_symbol: 57,
|
target_symbol: 57,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -841,7 +760,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
20,
|
20,
|
||||||
),
|
),
|
||||||
address: 185,
|
address: 153,
|
||||||
target_symbol: 54,
|
target_symbol: 54,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -849,7 +768,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
20,
|
20,
|
||||||
),
|
),
|
||||||
address: 219,
|
address: 172,
|
||||||
target_symbol: 54,
|
target_symbol: 54,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -857,7 +776,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
20,
|
20,
|
||||||
),
|
),
|
||||||
address: 238,
|
address: 191,
|
||||||
target_symbol: 52,
|
target_symbol: 52,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -865,7 +784,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
20,
|
20,
|
||||||
),
|
),
|
||||||
address: 267,
|
address: 218,
|
||||||
target_symbol: 57,
|
target_symbol: 57,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -873,7 +792,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
20,
|
20,
|
||||||
),
|
),
|
||||||
address: 286,
|
address: 237,
|
||||||
target_symbol: 52,
|
target_symbol: 52,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -881,7 +800,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
6,
|
6,
|
||||||
),
|
),
|
||||||
address: 308,
|
address: 257,
|
||||||
target_symbol: 68,
|
target_symbol: 68,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -889,7 +808,7 @@ expression: obj.sections
|
|||||||
flags: Coff(
|
flags: Coff(
|
||||||
20,
|
20,
|
||||||
),
|
),
|
||||||
address: 313,
|
address: 262,
|
||||||
target_symbol: 60,
|
target_symbol: 60,
|
||||||
addend: 0,
|
addend: 0,
|
||||||
},
|
},
|
||||||
@ -902,14 +821,11 @@ expression: obj.sections
|
|||||||
name: ".text$yd",
|
name: ".text$yd",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Code,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
16,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -919,14 +835,11 @@ expression: obj.sections
|
|||||||
name: ".rdata",
|
name: ".rdata",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -936,14 +849,11 @@ expression: obj.sections
|
|||||||
name: ".rdata",
|
name: ".rdata",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -953,14 +863,11 @@ expression: obj.sections
|
|||||||
name: ".data",
|
name: ".data",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -970,14 +877,11 @@ expression: obj.sections
|
|||||||
name: ".rdata$r",
|
name: ".rdata$r",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -987,14 +891,11 @@ expression: obj.sections
|
|||||||
name: ".rdata$r",
|
name: ".rdata$r",
|
||||||
address: 0,
|
address: 0,
|
||||||
size: 0,
|
size: 0,
|
||||||
kind: Unknown,
|
kind: Data,
|
||||||
data: SectionData(
|
data: SectionData(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(Hidden),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
@ -1009,9 +910,6 @@ expression: obj.sections
|
|||||||
4,
|
4,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
4,
|
|
||||||
),
|
|
||||||
relocations: [
|
relocations: [
|
||||||
Relocation {
|
Relocation {
|
||||||
flags: Coff(
|
flags: Coff(
|
||||||
@ -1035,9 +933,6 @@ expression: obj.sections
|
|||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
flags: FlagSet(),
|
flags: FlagSet(),
|
||||||
align: Some(
|
|
||||||
16,
|
|
||||||
),
|
|
||||||
relocations: [],
|
relocations: [],
|
||||||
line_info: {},
|
line_info: {},
|
||||||
virtual_address: None,
|
virtual_address: None,
|
||||||
|
@ -1,622 +0,0 @@
|
|||||||
---
|
|
||||||
source: objdiff-core/tests/arch_x86.rs
|
|
||||||
expression: diff.instruction_rows
|
|
||||||
---
|
|
||||||
[
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 0,
|
|
||||||
size: 4,
|
|
||||||
opcode: 414,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 4,
|
|
||||||
size: 1,
|
|
||||||
opcode: 137,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 5,
|
|
||||||
size: 3,
|
|
||||||
opcode: 93,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 8,
|
|
||||||
size: 2,
|
|
||||||
opcode: 297,
|
|
||||||
branch_dest: Some(
|
|
||||||
58,
|
|
||||||
),
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: Some(
|
|
||||||
InstructionBranchTo {
|
|
||||||
ins_idx: 18,
|
|
||||||
branch_idx: 0,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 10,
|
|
||||||
size: 7,
|
|
||||||
opcode: 308,
|
|
||||||
branch_dest: Some(
|
|
||||||
60,
|
|
||||||
),
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: Some(
|
|
||||||
InstructionBranchTo {
|
|
||||||
ins_idx: 20,
|
|
||||||
branch_idx: 1,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 17,
|
|
||||||
size: 5,
|
|
||||||
opcode: 414,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: Some(
|
|
||||||
InstructionBranchFrom {
|
|
||||||
ins_idx: [
|
|
||||||
20,
|
|
||||||
],
|
|
||||||
branch_idx: 2,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 22,
|
|
||||||
size: 1,
|
|
||||||
opcode: 662,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 23,
|
|
||||||
size: 5,
|
|
||||||
opcode: 414,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: Some(
|
|
||||||
InstructionBranchFrom {
|
|
||||||
ins_idx: [
|
|
||||||
21,
|
|
||||||
],
|
|
||||||
branch_idx: 3,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 28,
|
|
||||||
size: 1,
|
|
||||||
opcode: 662,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 29,
|
|
||||||
size: 5,
|
|
||||||
opcode: 414,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: Some(
|
|
||||||
InstructionBranchFrom {
|
|
||||||
ins_idx: [
|
|
||||||
22,
|
|
||||||
],
|
|
||||||
branch_idx: 4,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 34,
|
|
||||||
size: 1,
|
|
||||||
opcode: 662,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 35,
|
|
||||||
size: 5,
|
|
||||||
opcode: 414,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: Some(
|
|
||||||
InstructionBranchFrom {
|
|
||||||
ins_idx: [
|
|
||||||
23,
|
|
||||||
],
|
|
||||||
branch_idx: 5,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 40,
|
|
||||||
size: 1,
|
|
||||||
opcode: 662,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 41,
|
|
||||||
size: 5,
|
|
||||||
opcode: 414,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: Some(
|
|
||||||
InstructionBranchFrom {
|
|
||||||
ins_idx: [
|
|
||||||
24,
|
|
||||||
],
|
|
||||||
branch_idx: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 46,
|
|
||||||
size: 1,
|
|
||||||
opcode: 662,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 47,
|
|
||||||
size: 5,
|
|
||||||
opcode: 414,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: Some(
|
|
||||||
InstructionBranchFrom {
|
|
||||||
ins_idx: [
|
|
||||||
25,
|
|
||||||
],
|
|
||||||
branch_idx: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 52,
|
|
||||||
size: 1,
|
|
||||||
opcode: 662,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 53,
|
|
||||||
size: 5,
|
|
||||||
opcode: 414,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: Some(
|
|
||||||
InstructionBranchFrom {
|
|
||||||
ins_idx: [
|
|
||||||
26,
|
|
||||||
],
|
|
||||||
branch_idx: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 58,
|
|
||||||
size: 1,
|
|
||||||
opcode: 662,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: Some(
|
|
||||||
InstructionBranchFrom {
|
|
||||||
ins_idx: [
|
|
||||||
3,
|
|
||||||
],
|
|
||||||
branch_idx: 0,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 59,
|
|
||||||
size: 1,
|
|
||||||
opcode: 465,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 60,
|
|
||||||
size: 4,
|
|
||||||
opcode: 65534,
|
|
||||||
branch_dest: Some(
|
|
||||||
17,
|
|
||||||
),
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: Some(
|
|
||||||
InstructionBranchFrom {
|
|
||||||
ins_idx: [
|
|
||||||
4,
|
|
||||||
],
|
|
||||||
branch_idx: 1,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
branch_to: Some(
|
|
||||||
InstructionBranchTo {
|
|
||||||
ins_idx: 5,
|
|
||||||
branch_idx: 2,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 64,
|
|
||||||
size: 4,
|
|
||||||
opcode: 65534,
|
|
||||||
branch_dest: Some(
|
|
||||||
23,
|
|
||||||
),
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: Some(
|
|
||||||
InstructionBranchTo {
|
|
||||||
ins_idx: 7,
|
|
||||||
branch_idx: 3,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 68,
|
|
||||||
size: 4,
|
|
||||||
opcode: 65534,
|
|
||||||
branch_dest: Some(
|
|
||||||
29,
|
|
||||||
),
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: Some(
|
|
||||||
InstructionBranchTo {
|
|
||||||
ins_idx: 9,
|
|
||||||
branch_idx: 4,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 72,
|
|
||||||
size: 4,
|
|
||||||
opcode: 65534,
|
|
||||||
branch_dest: Some(
|
|
||||||
35,
|
|
||||||
),
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: Some(
|
|
||||||
InstructionBranchTo {
|
|
||||||
ins_idx: 11,
|
|
||||||
branch_idx: 5,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 76,
|
|
||||||
size: 4,
|
|
||||||
opcode: 65534,
|
|
||||||
branch_dest: Some(
|
|
||||||
41,
|
|
||||||
),
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: Some(
|
|
||||||
InstructionBranchTo {
|
|
||||||
ins_idx: 13,
|
|
||||||
branch_idx: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 80,
|
|
||||||
size: 4,
|
|
||||||
opcode: 65534,
|
|
||||||
branch_dest: Some(
|
|
||||||
47,
|
|
||||||
),
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: Some(
|
|
||||||
InstructionBranchTo {
|
|
||||||
ins_idx: 15,
|
|
||||||
branch_idx: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 84,
|
|
||||||
size: 4,
|
|
||||||
opcode: 65534,
|
|
||||||
branch_dest: Some(
|
|
||||||
53,
|
|
||||||
),
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: Some(
|
|
||||||
InstructionBranchTo {
|
|
||||||
ins_idx: 17,
|
|
||||||
branch_idx: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 88,
|
|
||||||
size: 1,
|
|
||||||
opcode: 465,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 89,
|
|
||||||
size: 1,
|
|
||||||
opcode: 465,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 90,
|
|
||||||
size: 1,
|
|
||||||
opcode: 465,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 91,
|
|
||||||
size: 1,
|
|
||||||
opcode: 465,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 92,
|
|
||||||
size: 1,
|
|
||||||
opcode: 465,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 93,
|
|
||||||
size: 1,
|
|
||||||
opcode: 465,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 94,
|
|
||||||
size: 1,
|
|
||||||
opcode: 465,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
InstructionDiffRow {
|
|
||||||
ins_ref: Some(
|
|
||||||
InstructionRef {
|
|
||||||
address: 95,
|
|
||||||
size: 1,
|
|
||||||
opcode: 465,
|
|
||||||
branch_dest: None,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
kind: None,
|
|
||||||
branch_from: None,
|
|
||||||
branch_to: None,
|
|
||||||
arg_diff: [],
|
|
||||||
},
|
|
||||||
]
|
|
@ -1,39 +0,0 @@
|
|||||||
---
|
|
||||||
source: objdiff-core/tests/arch_x86.rs
|
|
||||||
expression: output
|
|
||||||
---
|
|
||||||
[(Address(0), Normal, 5), (Spacing(4), Normal, 0), (Opcode("mov", 414), Normal, 10), (Argument(Opaque("eax")), Normal, 0), (Basic(","), Normal, 0), (Spacing(1), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("esp")), Normal, 0), (Argument(Opaque("+")), Normal, 0), (Argument(Signed(4)), Normal, 0), (Basic("]"), Normal, 0), (Eol, Normal, 0)]
|
|
||||||
[(Address(4), Normal, 5), (Spacing(4), Normal, 0), (Opcode("dec", 137), Normal, 10), (Argument(Opaque("eax")), Normal, 0), (Eol, Normal, 0)]
|
|
||||||
[(Address(5), Normal, 5), (Spacing(4), Normal, 0), (Opcode("cmp", 93), Normal, 10), (Argument(Opaque("eax")), Normal, 0), (Basic(","), Normal, 0), (Spacing(1), Normal, 0), (Argument(Unsigned(6)), Normal, 0), (Eol, Normal, 0)]
|
|
||||||
[(Address(8), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ja", 297), Normal, 10), (Argument(Opaque("short")), Normal, 0), (Spacing(1), Normal, 0), (BranchDest(58), Normal, 0), (Basic(" ~>"), Rotating(0), 0), (Eol, Normal, 0)]
|
|
||||||
[(Address(10), Normal, 5), (Spacing(4), Normal, 0), (Opcode("jmp", 308), Normal, 10), (Argument(Opaque("dword")), Normal, 0), (Spacing(1), Normal, 0), (Argument(Opaque("ptr")), Normal, 0), (Spacing(1), Normal, 0), (Basic("["), Normal, 0), (Argument(Opaque("eax")), Normal, 0), (Argument(Opaque("*")), Normal, 0), (Argument(Signed(4)), Normal, 0), (Argument(Opaque("+")), Normal, 0), (BranchDest(60), Normal, 0), (Basic("]"), Normal, 0), (Basic(" ~>"), Rotating(1), 0), (Eol, Normal, 0)]
|
|
||||||
[(Address(17), Normal, 5), (Basic(" ~> "), Rotating(2), 0), (Opcode("mov", 414), Normal, 10), (Argument(Opaque("eax")), Normal, 0), (Basic(","), Normal, 0), (Spacing(1), Normal, 0), (Argument(Unsigned(8)), Normal, 0), (Eol, Normal, 0)]
|
|
||||||
[(Address(22), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ret", 662), Normal, 10), (Eol, Normal, 0)]
|
|
||||||
[(Address(23), Normal, 5), (Basic(" ~> "), Rotating(3), 0), (Opcode("mov", 414), Normal, 10), (Argument(Opaque("eax")), Normal, 0), (Basic(","), Normal, 0), (Spacing(1), Normal, 0), (Argument(Unsigned(7)), Normal, 0), (Eol, Normal, 0)]
|
|
||||||
[(Address(28), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ret", 662), Normal, 10), (Eol, Normal, 0)]
|
|
||||||
[(Address(29), Normal, 5), (Basic(" ~> "), Rotating(4), 0), (Opcode("mov", 414), Normal, 10), (Argument(Opaque("eax")), Normal, 0), (Basic(","), Normal, 0), (Spacing(1), Normal, 0), (Argument(Unsigned(6)), Normal, 0), (Eol, Normal, 0)]
|
|
||||||
[(Address(34), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ret", 662), Normal, 10), (Eol, Normal, 0)]
|
|
||||||
[(Address(35), Normal, 5), (Basic(" ~> "), Rotating(5), 0), (Opcode("mov", 414), Normal, 10), (Argument(Opaque("eax")), Normal, 0), (Basic(","), Normal, 0), (Spacing(1), Normal, 0), (Argument(Unsigned(5)), Normal, 0), (Eol, Normal, 0)]
|
|
||||||
[(Address(40), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ret", 662), Normal, 10), (Eol, Normal, 0)]
|
|
||||||
[(Address(41), Normal, 5), (Basic(" ~> "), Rotating(6), 0), (Opcode("mov", 414), Normal, 10), (Argument(Opaque("eax")), Normal, 0), (Basic(","), Normal, 0), (Spacing(1), Normal, 0), (Argument(Unsigned(4)), Normal, 0), (Eol, Normal, 0)]
|
|
||||||
[(Address(46), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ret", 662), Normal, 10), (Eol, Normal, 0)]
|
|
||||||
[(Address(47), Normal, 5), (Basic(" ~> "), Rotating(7), 0), (Opcode("mov", 414), Normal, 10), (Argument(Opaque("eax")), Normal, 0), (Basic(","), Normal, 0), (Spacing(1), Normal, 0), (Argument(Unsigned(3)), Normal, 0), (Eol, Normal, 0)]
|
|
||||||
[(Address(52), Normal, 5), (Spacing(4), Normal, 0), (Opcode("ret", 662), Normal, 10), (Eol, Normal, 0)]
|
|
||||||
[(Address(53), Normal, 5), (Basic(" ~> "), Rotating(8), 0), (Opcode("mov", 414), Normal, 10), (Argument(Opaque("eax")), Normal, 0), (Basic(","), Normal, 0), (Spacing(1), Normal, 0), (Argument(Unsigned(2)), Normal, 0), (Eol, Normal, 0)]
|
|
||||||
[(Address(58), Normal, 5), (Basic(" ~> "), Rotating(0), 0), (Opcode("ret", 662), Normal, 10), (Eol, Normal, 0)]
|
|
||||||
[(Address(59), Normal, 5), (Spacing(4), Normal, 0), (Opcode("nop", 465), Normal, 10), (Eol, Normal, 0)]
|
|
||||||
[(Address(60), Normal, 5), (Basic(" ~> "), Rotating(1), 0), (Opcode(".dword", 65534), Normal, 10), (BranchDest(17), Normal, 0), (Basic(" ~>"), Rotating(2), 0), (Eol, Normal, 0)]
|
|
||||||
[(Address(64), Normal, 5), (Spacing(4), Normal, 0), (Opcode(".dword", 65534), Normal, 10), (BranchDest(23), Normal, 0), (Basic(" ~>"), Rotating(3), 0), (Eol, Normal, 0)]
|
|
||||||
[(Address(68), Normal, 5), (Spacing(4), Normal, 0), (Opcode(".dword", 65534), Normal, 10), (BranchDest(29), Normal, 0), (Basic(" ~>"), Rotating(4), 0), (Eol, Normal, 0)]
|
|
||||||
[(Address(72), Normal, 5), (Spacing(4), Normal, 0), (Opcode(".dword", 65534), Normal, 10), (BranchDest(35), Normal, 0), (Basic(" ~>"), Rotating(5), 0), (Eol, Normal, 0)]
|
|
||||||
[(Address(76), Normal, 5), (Spacing(4), Normal, 0), (Opcode(".dword", 65534), Normal, 10), (BranchDest(41), Normal, 0), (Basic(" ~>"), Rotating(6), 0), (Eol, Normal, 0)]
|
|
||||||
[(Address(80), Normal, 5), (Spacing(4), Normal, 0), (Opcode(".dword", 65534), Normal, 10), (BranchDest(47), Normal, 0), (Basic(" ~>"), Rotating(7), 0), (Eol, Normal, 0)]
|
|
||||||
[(Address(84), Normal, 5), (Spacing(4), Normal, 0), (Opcode(".dword", 65534), Normal, 10), (BranchDest(53), Normal, 0), (Basic(" ~>"), Rotating(8), 0), (Eol, Normal, 0)]
|
|
||||||
[(Address(88), Normal, 5), (Spacing(4), Normal, 0), (Opcode("nop", 465), Normal, 10), (Eol, Normal, 0)]
|
|
||||||
[(Address(89), Normal, 5), (Spacing(4), Normal, 0), (Opcode("nop", 465), Normal, 10), (Eol, Normal, 0)]
|
|
||||||
[(Address(90), Normal, 5), (Spacing(4), Normal, 0), (Opcode("nop", 465), Normal, 10), (Eol, Normal, 0)]
|
|
||||||
[(Address(91), Normal, 5), (Spacing(4), Normal, 0), (Opcode("nop", 465), Normal, 10), (Eol, Normal, 0)]
|
|
||||||
[(Address(92), Normal, 5), (Spacing(4), Normal, 0), (Opcode("nop", 465), Normal, 10), (Eol, Normal, 0)]
|
|
||||||
[(Address(93), Normal, 5), (Spacing(4), Normal, 0), (Opcode("nop", 465), Normal, 10), (Eol, Normal, 0)]
|
|
||||||
[(Address(94), Normal, 5), (Spacing(4), Normal, 0), (Opcode("nop", 465), Normal, 10), (Eol, Normal, 0)]
|
|
||||||
[(Address(95), Normal, 5), (Spacing(4), Normal, 0), (Opcode("nop", 465), Normal, 10), (Eol, Normal, 0)]
|
|
@ -1,314 +0,0 @@
|
|||||||
---
|
|
||||||
source: objdiff-core/tests/arch_x86.rs
|
|
||||||
expression: obj
|
|
||||||
---
|
|
||||||
Object {
|
|
||||||
arch: ArchX86 {
|
|
||||||
arch: X86,
|
|
||||||
endianness: Little,
|
|
||||||
},
|
|
||||||
endianness: Little,
|
|
||||||
symbols: [
|
|
||||||
Symbol {
|
|
||||||
name: "Z:/tmp/code.c",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 0,
|
|
||||||
size: 0,
|
|
||||||
kind: Unknown,
|
|
||||||
section: None,
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "@comp.id",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 0,
|
|
||||||
size: 0,
|
|
||||||
kind: Object,
|
|
||||||
section: None,
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "[.drectve]",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 0,
|
|
||||||
size: 38,
|
|
||||||
kind: Section,
|
|
||||||
section: Some(
|
|
||||||
0,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "[.text]",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 0,
|
|
||||||
size: 0,
|
|
||||||
kind: Section,
|
|
||||||
section: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "?test@@YAHH@Z",
|
|
||||||
demangled_name: Some(
|
|
||||||
"int __cdecl test(int)",
|
|
||||||
),
|
|
||||||
address: 0,
|
|
||||||
size: 96,
|
|
||||||
kind: Function,
|
|
||||||
section: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Global | SizeInferred),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "$L278",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 53,
|
|
||||||
size: 0,
|
|
||||||
kind: Unknown,
|
|
||||||
section: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "$L277",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 47,
|
|
||||||
size: 0,
|
|
||||||
kind: Unknown,
|
|
||||||
section: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "$L276",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 41,
|
|
||||||
size: 0,
|
|
||||||
kind: Unknown,
|
|
||||||
section: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "$L275",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 35,
|
|
||||||
size: 0,
|
|
||||||
kind: Unknown,
|
|
||||||
section: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "$L274",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 29,
|
|
||||||
size: 0,
|
|
||||||
kind: Unknown,
|
|
||||||
section: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "$L273",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 23,
|
|
||||||
size: 0,
|
|
||||||
kind: Unknown,
|
|
||||||
section: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "$L272",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 17,
|
|
||||||
size: 0,
|
|
||||||
kind: Unknown,
|
|
||||||
section: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "$L282",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 60,
|
|
||||||
size: 0,
|
|
||||||
kind: Unknown,
|
|
||||||
section: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "[.debug$F]",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 0,
|
|
||||||
size: 16,
|
|
||||||
kind: Section,
|
|
||||||
section: Some(
|
|
||||||
2,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
sections: [
|
|
||||||
Section {
|
|
||||||
id: ".drectve-0",
|
|
||||||
name: ".drectve",
|
|
||||||
address: 0,
|
|
||||||
size: 38,
|
|
||||||
kind: Unknown,
|
|
||||||
data: SectionData(
|
|
||||||
0,
|
|
||||||
),
|
|
||||||
flags: FlagSet(),
|
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
|
||||||
line_info: {},
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Section {
|
|
||||||
id: ".text-0",
|
|
||||||
name: ".text",
|
|
||||||
address: 0,
|
|
||||||
size: 96,
|
|
||||||
kind: Code,
|
|
||||||
data: SectionData(
|
|
||||||
96,
|
|
||||||
),
|
|
||||||
flags: FlagSet(),
|
|
||||||
align: Some(
|
|
||||||
16,
|
|
||||||
),
|
|
||||||
relocations: [
|
|
||||||
Relocation {
|
|
||||||
flags: Coff(
|
|
||||||
6,
|
|
||||||
),
|
|
||||||
address: 13,
|
|
||||||
target_symbol: 12,
|
|
||||||
addend: 0,
|
|
||||||
},
|
|
||||||
Relocation {
|
|
||||||
flags: Coff(
|
|
||||||
6,
|
|
||||||
),
|
|
||||||
address: 60,
|
|
||||||
target_symbol: 11,
|
|
||||||
addend: 0,
|
|
||||||
},
|
|
||||||
Relocation {
|
|
||||||
flags: Coff(
|
|
||||||
6,
|
|
||||||
),
|
|
||||||
address: 64,
|
|
||||||
target_symbol: 10,
|
|
||||||
addend: 0,
|
|
||||||
},
|
|
||||||
Relocation {
|
|
||||||
flags: Coff(
|
|
||||||
6,
|
|
||||||
),
|
|
||||||
address: 68,
|
|
||||||
target_symbol: 9,
|
|
||||||
addend: 0,
|
|
||||||
},
|
|
||||||
Relocation {
|
|
||||||
flags: Coff(
|
|
||||||
6,
|
|
||||||
),
|
|
||||||
address: 72,
|
|
||||||
target_symbol: 8,
|
|
||||||
addend: 0,
|
|
||||||
},
|
|
||||||
Relocation {
|
|
||||||
flags: Coff(
|
|
||||||
6,
|
|
||||||
),
|
|
||||||
address: 76,
|
|
||||||
target_symbol: 7,
|
|
||||||
addend: 0,
|
|
||||||
},
|
|
||||||
Relocation {
|
|
||||||
flags: Coff(
|
|
||||||
6,
|
|
||||||
),
|
|
||||||
address: 80,
|
|
||||||
target_symbol: 6,
|
|
||||||
addend: 0,
|
|
||||||
},
|
|
||||||
Relocation {
|
|
||||||
flags: Coff(
|
|
||||||
6,
|
|
||||||
),
|
|
||||||
address: 84,
|
|
||||||
target_symbol: 5,
|
|
||||||
addend: 0,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
line_info: {},
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Section {
|
|
||||||
id: ".debug$F-0",
|
|
||||||
name: ".debug$F",
|
|
||||||
address: 0,
|
|
||||||
size: 16,
|
|
||||||
kind: Unknown,
|
|
||||||
data: SectionData(
|
|
||||||
0,
|
|
||||||
),
|
|
||||||
flags: FlagSet(),
|
|
||||||
align: Some(
|
|
||||||
1,
|
|
||||||
),
|
|
||||||
relocations: [],
|
|
||||||
line_info: {},
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_meta: None,
|
|
||||||
path: None,
|
|
||||||
timestamp: None,
|
|
||||||
}
|
|
@ -1,163 +0,0 @@
|
|||||||
---
|
|
||||||
source: objdiff-core/tests/arch_x86.rs
|
|
||||||
expression: obj
|
|
||||||
---
|
|
||||||
Object {
|
|
||||||
arch: ArchX86 {
|
|
||||||
arch: X86,
|
|
||||||
endianness: Little,
|
|
||||||
},
|
|
||||||
endianness: Little,
|
|
||||||
symbols: [
|
|
||||||
Symbol {
|
|
||||||
name: "42b830_convertToUppercaseShiftJIS.obj",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 0,
|
|
||||||
size: 0,
|
|
||||||
kind: Unknown,
|
|
||||||
section: None,
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "[.text]",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 0,
|
|
||||||
size: 0,
|
|
||||||
kind: Section,
|
|
||||||
section: Some(
|
|
||||||
0,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "LAB_0042b850",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 32,
|
|
||||||
size: 0,
|
|
||||||
kind: Object,
|
|
||||||
section: Some(
|
|
||||||
0,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "LAB_0042b883",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 83,
|
|
||||||
size: 0,
|
|
||||||
kind: Object,
|
|
||||||
section: Some(
|
|
||||||
0,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "LAB_0042b87c",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 76,
|
|
||||||
size: 0,
|
|
||||||
kind: Object,
|
|
||||||
section: Some(
|
|
||||||
0,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "LAB_0042b884",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 84,
|
|
||||||
size: 0,
|
|
||||||
kind: Object,
|
|
||||||
section: Some(
|
|
||||||
0,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "LAB_0042b889",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 89,
|
|
||||||
size: 0,
|
|
||||||
kind: Object,
|
|
||||||
section: Some(
|
|
||||||
0,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "LAB_0042b845",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 21,
|
|
||||||
size: 0,
|
|
||||||
kind: Object,
|
|
||||||
section: Some(
|
|
||||||
0,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "LAB_0042b869",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 57,
|
|
||||||
size: 0,
|
|
||||||
kind: Object,
|
|
||||||
section: Some(
|
|
||||||
0,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Local),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
Symbol {
|
|
||||||
name: "ConvertToUppercaseShiftJIS",
|
|
||||||
demangled_name: None,
|
|
||||||
address: 0,
|
|
||||||
size: 92,
|
|
||||||
kind: Function,
|
|
||||||
section: Some(
|
|
||||||
0,
|
|
||||||
),
|
|
||||||
flags: FlagSet(Global | SizeInferred),
|
|
||||||
align: None,
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
sections: [
|
|
||||||
Section {
|
|
||||||
id: ".text-0",
|
|
||||||
name: ".text",
|
|
||||||
address: 0,
|
|
||||||
size: 92,
|
|
||||||
kind: Code,
|
|
||||||
data: SectionData(
|
|
||||||
92,
|
|
||||||
),
|
|
||||||
flags: FlagSet(),
|
|
||||||
align: Some(
|
|
||||||
16,
|
|
||||||
),
|
|
||||||
relocations: [],
|
|
||||||
line_info: {},
|
|
||||||
virtual_address: None,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
split_meta: None,
|
|
||||||
path: None,
|
|
||||||
timestamp: None,
|
|
||||||
}
|
|
@ -42,11 +42,11 @@ png = "0.17"
|
|||||||
pollster = "0.4"
|
pollster = "0.4"
|
||||||
regex = "1.11"
|
regex = "1.11"
|
||||||
rfd = { version = "0.15" } #, default-features = false, features = ['xdg-portal']
|
rfd = { version = "0.15" } #, default-features = false, features = ['xdg-portal']
|
||||||
rlwinmdec = "1.1"
|
rlwinmdec = { version = "1.0", git = "https://github.com/CelestialAmber/rlwinmdec.git" }
|
||||||
ron = "0.8"
|
ron = "0.8"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
time = { version = "0.3", features = ["formatting", "local-offset"] }
|
time = { version = "0.3", features = ["formatting", "local-offset"] }
|
||||||
typed-path = "0.11"
|
typed-path = "0.10"
|
||||||
winit = { version = "0.30", features = ["wayland-csd-adwaita"] }
|
winit = { version = "0.30", features = ["wayland-csd-adwaita"] }
|
||||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||||
|
|
||||||
|
@ -775,8 +775,10 @@ impl eframe::App for App {
|
|||||||
|
|
||||||
if side_panel_available {
|
if side_panel_available {
|
||||||
egui::SidePanel::left("side_panel").show_animated(ctx, *show_side_panel, |ui| {
|
egui::SidePanel::left("side_panel").show_animated(ctx, *show_side_panel, |ui| {
|
||||||
|
egui::ScrollArea::both().show(ui, |ui| {
|
||||||
config_ui(ui, state, show_project_config, config_state, appearance);
|
config_ui(ui, state, show_project_config, config_state, appearance);
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut action = None;
|
let mut action = None;
|
||||||
|
@ -297,7 +297,6 @@ pub fn config_ui(
|
|||||||
node_open = NodeOpen::Open;
|
node_open = NodeOpen::Open;
|
||||||
}
|
}
|
||||||
|
|
||||||
egui::ScrollArea::both().auto_shrink(false).show(ui, |ui| {
|
|
||||||
CollapsingHeader::new(RichText::new("🗀 Objects").font(FontId {
|
CollapsingHeader::new(RichText::new("🗀 Objects").font(FontId {
|
||||||
size: appearance.ui_font.size,
|
size: appearance.ui_font.size,
|
||||||
family: appearance.code_font.family.clone(),
|
family: appearance.code_font.family.clone(),
|
||||||
@ -317,17 +316,9 @@ pub fn config_ui(
|
|||||||
config_state.show_hidden,
|
config_state.show_hidden,
|
||||||
)
|
)
|
||||||
}) {
|
}) {
|
||||||
display_node(
|
display_node(ui, &mut new_selected_index, objects, &node, appearance, node_open);
|
||||||
ui,
|
|
||||||
&mut new_selected_index,
|
|
||||||
objects,
|
|
||||||
&node,
|
|
||||||
appearance,
|
|
||||||
node_open,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
if new_selected_index != selected_index {
|
if new_selected_index != selected_index {
|
||||||
if let Some(idx) = new_selected_index {
|
if let Some(idx) = new_selected_index {
|
||||||
@ -336,6 +327,11 @@ pub fn config_ui(
|
|||||||
state_guard.set_selected_obj(config);
|
state_guard.set_selected_obj(config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if state_guard.config.selected_obj.is_some()
|
||||||
|
&& ui.add_enabled(!config_state.build_running, egui::Button::new("Build")).clicked()
|
||||||
|
{
|
||||||
|
config_state.queue_build = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn display_unit(
|
fn display_unit(
|
||||||
|
@ -5,7 +5,7 @@ use objdiff_core::{
|
|||||||
diff::{
|
diff::{
|
||||||
DataDiff, DataDiffKind, DataRelocationDiff,
|
DataDiff, DataDiffKind, DataRelocationDiff,
|
||||||
data::resolve_relocation,
|
data::resolve_relocation,
|
||||||
display::{ContextItem, HoverItem, HoverItemColor, relocation_context, relocation_hover},
|
display::{ContextItem, HoverItem, relocation_context, relocation_hover},
|
||||||
},
|
},
|
||||||
obj::Object,
|
obj::Object,
|
||||||
};
|
};
|
||||||
@ -19,7 +19,6 @@ fn data_row_hover(obj: &Object, diffs: &[(DataDiff, Vec<DataRelocationDiff>)]) -
|
|||||||
let mut out = Vec::new();
|
let mut out = Vec::new();
|
||||||
let reloc_diffs = diffs.iter().flat_map(|(_, reloc_diffs)| reloc_diffs);
|
let reloc_diffs = diffs.iter().flat_map(|(_, reloc_diffs)| reloc_diffs);
|
||||||
let mut prev_reloc = None;
|
let mut prev_reloc = None;
|
||||||
let mut first = true;
|
|
||||||
for reloc_diff in reloc_diffs {
|
for reloc_diff in reloc_diffs {
|
||||||
let reloc = &reloc_diff.reloc;
|
let reloc = &reloc_diff.reloc;
|
||||||
if prev_reloc == Some(reloc) {
|
if prev_reloc == Some(reloc) {
|
||||||
@ -30,16 +29,11 @@ fn data_row_hover(obj: &Object, diffs: &[(DataDiff, Vec<DataRelocationDiff>)]) -
|
|||||||
}
|
}
|
||||||
prev_reloc = Some(reloc);
|
prev_reloc = Some(reloc);
|
||||||
|
|
||||||
if first {
|
// TODO: Change hover text color depending on Insert/Delete/Replace kind
|
||||||
first = false;
|
// let color = get_color_for_diff_kind(reloc_diff.kind, appearance);
|
||||||
} else {
|
|
||||||
out.push(HoverItem::Separator);
|
|
||||||
}
|
|
||||||
|
|
||||||
let color = get_hover_item_color_for_diff_kind(reloc_diff.kind);
|
|
||||||
|
|
||||||
let reloc = resolve_relocation(&obj.symbols, reloc);
|
let reloc = resolve_relocation(&obj.symbols, reloc);
|
||||||
out.append(&mut relocation_hover(obj, reloc, Some(color)));
|
out.append(&mut relocation_hover(obj, reloc));
|
||||||
}
|
}
|
||||||
out
|
out
|
||||||
}
|
}
|
||||||
@ -103,15 +97,6 @@ fn get_color_for_diff_kind(diff_kind: DataDiffKind, appearance: &Appearance) ->
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_hover_item_color_for_diff_kind(diff_kind: DataDiffKind) -> HoverItemColor {
|
|
||||||
match diff_kind {
|
|
||||||
DataDiffKind::None => HoverItemColor::Normal,
|
|
||||||
DataDiffKind::Replace => HoverItemColor::Special,
|
|
||||||
DataDiffKind::Delete => HoverItemColor::Delete,
|
|
||||||
DataDiffKind::Insert => HoverItemColor::Insert,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub(crate) fn data_row_ui(
|
pub(crate) fn data_row_ui(
|
||||||
ui: &mut egui::Ui,
|
ui: &mut egui::Ui,
|
||||||
obj: Option<&Object>,
|
obj: Option<&Object>,
|
||||||
@ -147,20 +132,14 @@ pub(crate) fn data_row_ui(
|
|||||||
cur_addr += diff.len;
|
cur_addr += diff.len;
|
||||||
} else {
|
} else {
|
||||||
for byte in &diff.data {
|
for byte in &diff.data {
|
||||||
let mut byte_text = format!("{byte:02x} ");
|
|
||||||
let mut byte_color = base_color;
|
let mut byte_color = base_color;
|
||||||
if let Some(reloc_diff) = reloc_diffs
|
if let Some(reloc_diff) = reloc_diffs.iter().find(|reloc_diff| {
|
||||||
.iter()
|
reloc_diff.kind != DataDiffKind::None
|
||||||
.find(|reloc_diff| reloc_diff.range.contains(&cur_addr_actual))
|
&& reloc_diff.range.contains(&cur_addr_actual)
|
||||||
{
|
}) {
|
||||||
if *byte == 0 {
|
|
||||||
// Display 00 data bytes with a relocation as ?? instead.
|
|
||||||
byte_text = "?? ".to_string();
|
|
||||||
}
|
|
||||||
if reloc_diff.kind != DataDiffKind::None {
|
|
||||||
byte_color = get_color_for_diff_kind(reloc_diff.kind, appearance);
|
byte_color = get_color_for_diff_kind(reloc_diff.kind, appearance);
|
||||||
}
|
}
|
||||||
}
|
let byte_text = format!("{byte:02x} ");
|
||||||
write_text(byte_text.as_str(), byte_color, &mut job, appearance.code_font.clone());
|
write_text(byte_text.as_str(), byte_color, &mut job, appearance.code_font.clone());
|
||||||
cur_addr += 1;
|
cur_addr += 1;
|
||||||
cur_addr_actual += 1;
|
cur_addr_actual += 1;
|
||||||
|
@ -49,9 +49,7 @@ impl<'a> DiffColumnContext<'a> {
|
|||||||
let selected_symbol = match view {
|
let selected_symbol = match view {
|
||||||
View::SymbolDiff => None,
|
View::SymbolDiff => None,
|
||||||
View::FunctionDiff | View::ExtabDiff => match (obj, selected_symbol) {
|
View::FunctionDiff | View::ExtabDiff => match (obj, selected_symbol) {
|
||||||
(Some(obj), Some(s)) => {
|
(Some(obj), Some(s)) => find_symbol(&obj.0, s).map(SelectedSymbol::Symbol),
|
||||||
obj.0.symbol_by_name(&s.symbol_name).map(SelectedSymbol::Symbol)
|
|
||||||
}
|
|
||||||
_ => None,
|
_ => None,
|
||||||
},
|
},
|
||||||
View::DataDiff => match (obj, selected_symbol) {
|
View::DataDiff => match (obj, selected_symbol) {
|
||||||
@ -499,7 +497,6 @@ pub fn diff_view_ui(
|
|||||||
(state.current_view, left_ctx.obj, right_ctx.obj, left_ctx.section, right_ctx.section)
|
(state.current_view, left_ctx.obj, right_ctx.obj, left_ctx.section, right_ctx.section)
|
||||||
{
|
{
|
||||||
// Joint diff view
|
// Joint diff view
|
||||||
hotkeys::check_scroll_hotkeys(ui, true);
|
|
||||||
let left_total_bytes =
|
let left_total_bytes =
|
||||||
left_section_diff.data_diff.iter().fold(0usize, |accum, item| accum + item.len);
|
left_section_diff.data_diff.iter().fold(0usize, |accum, item| accum + item.len);
|
||||||
let right_total_bytes =
|
let right_total_bytes =
|
||||||
@ -782,6 +779,10 @@ fn missing_obj_ui(ui: &mut Ui, appearance: &Appearance) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn find_symbol(obj: &Object, selected_symbol: &SymbolRefByName) -> Option<usize> {
|
||||||
|
obj.symbols.iter().position(|symbol| symbol.name == selected_symbol.symbol_name)
|
||||||
|
}
|
||||||
|
|
||||||
fn find_section(obj: &Object, section_name: &str) -> Option<usize> {
|
fn find_section(obj: &Object, section_name: &str) -> Option<usize> {
|
||||||
obj.sections.iter().position(|section| section.name == section_name)
|
obj.sections.iter().position(|section| section.name == section_name)
|
||||||
}
|
}
|
||||||
@ -794,8 +795,6 @@ pub fn hover_items_ui(ui: &mut Ui, items: Vec<HoverItem>, appearance: &Appearanc
|
|||||||
if !label.is_empty() {
|
if !label.is_empty() {
|
||||||
let label_color = match color {
|
let label_color = match color {
|
||||||
HoverItemColor::Special => appearance.replace_color,
|
HoverItemColor::Special => appearance.replace_color,
|
||||||
HoverItemColor::Delete => appearance.delete_color,
|
|
||||||
HoverItemColor::Insert => appearance.insert_color,
|
|
||||||
_ => appearance.highlight_color,
|
_ => appearance.highlight_color,
|
||||||
};
|
};
|
||||||
write_text(&label, label_color, &mut job, appearance.code_font.clone());
|
write_text(&label, label_color, &mut job, appearance.code_font.clone());
|
||||||
|
@ -512,7 +512,7 @@ pub fn symbol_hover_ui(
|
|||||||
ui.scope(|ui| {
|
ui.scope(|ui| {
|
||||||
ui.style_mut().override_text_style = Some(egui::TextStyle::Monospace);
|
ui.style_mut().override_text_style = Some(egui::TextStyle::Monospace);
|
||||||
ui.style_mut().wrap_mode = Some(egui::TextWrapMode::Wrap);
|
ui.style_mut().wrap_mode = Some(egui::TextWrapMode::Wrap);
|
||||||
hover_items_ui(ui, symbol_hover(ctx.obj, symbol_idx, 0, None), appearance);
|
hover_items_ui(ui, symbol_hover(ctx.obj, symbol_idx, 0), appearance);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "objdiff-wasm"
|
name = "objdiff-wasm"
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
edition = "2024"
|
# TODO: Update to 2024
|
||||||
|
# https://github.com/bytecodealliance/wit-bindgen/pull/1183
|
||||||
|
edition = "2021"
|
||||||
rust-version.workspace = true
|
rust-version.workspace = true
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
@ -23,18 +25,17 @@ std = ["objdiff-core/std"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
log = { version = "0.4", default-features = false }
|
log = { version = "0.4", default-features = false }
|
||||||
regex = { version = "1.11", default-features = false, features = ["unicode-case"] }
|
regex = { version = "1.11", default-features = false, features = ["unicode-case"] }
|
||||||
xxhash-rust = { version = "0.8", default-features = false, features = ["xxh3"] }
|
|
||||||
|
|
||||||
[dependencies.objdiff-core]
|
[dependencies.objdiff-core]
|
||||||
path = "../objdiff-core"
|
path = "../objdiff-core"
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["arm", "arm64", "mips", "ppc", "superh", "x86", "dwarf"]
|
features = ["arm", "arm64", "mips", "ppc", "x86", "dwarf"]
|
||||||
|
|
||||||
[target.'cfg(target_family = "wasm")'.dependencies]
|
[target.'cfg(target_family = "wasm")'.dependencies]
|
||||||
talc = { version = "4.4", default-features = false, features = ["lock_api"] }
|
talc = { version = "4.4", default-features = false, features = ["lock_api"] }
|
||||||
|
|
||||||
[target.'cfg(target_os = "wasi")'.dependencies]
|
[target.'cfg(target_os = "wasi")'.dependencies]
|
||||||
wit-bindgen = { version = "0.42", default-features = false, features = ["macros"] }
|
wit-bindgen = { version = "0.40", default-features = false, features = ["macros"] }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
wit-deps = "0.5"
|
wit-deps = "0.5"
|
||||||
|
4
objdiff-wasm/package-lock.json
generated
4
objdiff-wasm/package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "objdiff-wasm",
|
"name": "objdiff-wasm",
|
||||||
"version": "3.0.0-beta.9",
|
"version": "3.0.0-beta.4",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "objdiff-wasm",
|
"name": "objdiff-wasm",
|
||||||
"version": "3.0.0-beta.9",
|
"version": "3.0.0-beta.4",
|
||||||
"license": "MIT OR Apache-2.0",
|
"license": "MIT OR Apache-2.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "^1.9.3",
|
"@biomejs/biome": "^1.9.3",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "objdiff-wasm",
|
"name": "objdiff-wasm",
|
||||||
"version": "3.0.0-beta.9",
|
"version": "3.0.0-beta.4",
|
||||||
"description": "A local diffing tool for decompilation projects.",
|
"description": "A local diffing tool for decompilation projects.",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Luke Street",
|
"name": "Luke Street",
|
||||||
|
@ -1,16 +1,14 @@
|
|||||||
use alloc::{
|
use alloc::{
|
||||||
format,
|
format,
|
||||||
rc::{Rc, Weak},
|
rc::Rc,
|
||||||
str::FromStr,
|
str::FromStr,
|
||||||
string::{String, ToString},
|
string::{String, ToString},
|
||||||
vec,
|
|
||||||
vec::Vec,
|
vec::Vec,
|
||||||
};
|
};
|
||||||
use core::cell::RefCell;
|
use core::cell::RefCell;
|
||||||
|
|
||||||
use objdiff_core::{diff, obj};
|
use objdiff_core::{diff, obj};
|
||||||
use regex::{Regex, RegexBuilder};
|
use regex::{Regex, RegexBuilder};
|
||||||
use xxhash_rust::xxh3::xxh3_64;
|
|
||||||
|
|
||||||
use super::logging;
|
use super::logging;
|
||||||
|
|
||||||
@ -24,14 +22,14 @@ wit_bindgen::generate!({
|
|||||||
use exports::objdiff::core::{
|
use exports::objdiff::core::{
|
||||||
diff::{
|
diff::{
|
||||||
DiffConfigBorrow, DiffResult, Guest as GuestDiff, GuestDiffConfig, GuestObject,
|
DiffConfigBorrow, DiffResult, Guest as GuestDiff, GuestDiffConfig, GuestObject,
|
||||||
GuestObjectDiff, MappingConfig, Object, ObjectBorrow, ObjectDiff, ObjectDiffBorrow,
|
GuestObjectDiff, Object, ObjectBorrow, ObjectDiff, ObjectDiffBorrow,
|
||||||
SymbolFlags, SymbolInfo, SymbolKind, SymbolRef,
|
|
||||||
},
|
},
|
||||||
display::{
|
display::{
|
||||||
ContextItem, ContextItemCopy, ContextItemNavigate, DiffText, DiffTextColor, DiffTextOpcode,
|
ContextItem, ContextItemCopy, ContextItemNavigate, DiffText, DiffTextColor, DiffTextOpcode,
|
||||||
DiffTextSegment, DiffTextSymbol, DisplayConfig, Guest as GuestDisplay, HoverItem,
|
DiffTextSegment, DiffTextSymbol, DisplayConfig, Guest as GuestDisplay, HoverItem,
|
||||||
HoverItemColor, HoverItemText, InstructionDiffKind, InstructionDiffRow, SectionDisplay,
|
HoverItemColor, HoverItemText, InstructionDiffKind, InstructionDiffRow, SectionDisplay,
|
||||||
SymbolDisplay, SymbolFilter, SymbolNavigationKind,
|
SectionDisplaySymbol, SymbolDisplay, SymbolFilter, SymbolFlags, SymbolKind,
|
||||||
|
SymbolNavigationKind, SymbolRef,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -43,7 +41,8 @@ impl Guest for Component {
|
|||||||
fn version() -> String { env!("CARGO_PKG_VERSION").to_string() }
|
fn version() -> String { env!("CARGO_PKG_VERSION").to_string() }
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ResourceObject(Rc<obj::Object>, u64);
|
#[repr(transparent)]
|
||||||
|
struct ResourceObject(Rc<obj::Object>);
|
||||||
|
|
||||||
struct ResourceObjectDiff(Rc<obj::Object>, diff::ObjectDiff);
|
struct ResourceObjectDiff(Rc<obj::Object>, diff::ObjectDiff);
|
||||||
|
|
||||||
@ -59,17 +58,15 @@ impl GuestDiff for Component {
|
|||||||
left: Option<ObjectBorrow>,
|
left: Option<ObjectBorrow>,
|
||||||
right: Option<ObjectBorrow>,
|
right: Option<ObjectBorrow>,
|
||||||
diff_config: DiffConfigBorrow,
|
diff_config: DiffConfigBorrow,
|
||||||
mapping_config: MappingConfig,
|
|
||||||
) -> Result<DiffResult, String> {
|
) -> Result<DiffResult, String> {
|
||||||
let diff_config = diff_config.get::<ResourceDiffConfig>().0.borrow();
|
let diff_config = diff_config.get::<ResourceDiffConfig>().0.borrow();
|
||||||
let mapping_config = diff::MappingConfig::from(mapping_config);
|
|
||||||
log::debug!("Running diff with config: {:?}", diff_config);
|
log::debug!("Running diff with config: {:?}", diff_config);
|
||||||
let result = diff::diff_objs(
|
let result = diff::diff_objs(
|
||||||
left.as_ref().map(|o| o.get::<ResourceObject>().0.as_ref()),
|
left.as_ref().map(|o| o.get::<ResourceObject>().0.as_ref()),
|
||||||
right.as_ref().map(|o| o.get::<ResourceObject>().0.as_ref()),
|
right.as_ref().map(|o| o.get::<ResourceObject>().0.as_ref()),
|
||||||
None,
|
None,
|
||||||
&diff_config,
|
&diff_config,
|
||||||
&mapping_config,
|
&diff::MappingConfig::default(),
|
||||||
)
|
)
|
||||||
.map_err(|e| e.to_string())?;
|
.map_err(|e| e.to_string())?;
|
||||||
Ok(DiffResult {
|
Ok(DiffResult {
|
||||||
@ -136,80 +133,78 @@ impl GuestDisplay for Component {
|
|||||||
name: d.name,
|
name: d.name,
|
||||||
size: d.size,
|
size: d.size,
|
||||||
match_percent: d.match_percent,
|
match_percent: d.match_percent,
|
||||||
symbols: d.symbols.into_iter().map(to_symbol_ref).collect(),
|
symbols: d
|
||||||
|
.symbols
|
||||||
|
.into_iter()
|
||||||
|
.map(|s| SectionDisplaySymbol {
|
||||||
|
symbol: s.symbol as SymbolRef,
|
||||||
|
is_mapping_symbol: s.is_mapping_symbol,
|
||||||
|
})
|
||||||
|
.collect(),
|
||||||
})
|
})
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn display_symbol(diff: ObjectDiffBorrow, symbol_ref: SymbolRef) -> SymbolDisplay {
|
fn display_symbol(
|
||||||
|
diff: ObjectDiffBorrow,
|
||||||
|
symbol_display: SectionDisplaySymbol,
|
||||||
|
) -> SymbolDisplay {
|
||||||
let obj_diff = diff.get::<ResourceObjectDiff>();
|
let obj_diff = diff.get::<ResourceObjectDiff>();
|
||||||
let obj = obj_diff.0.as_ref();
|
let obj = obj_diff.0.as_ref();
|
||||||
let obj_diff = &obj_diff.1;
|
let obj_diff = &obj_diff.1;
|
||||||
let symbol_display = from_symbol_ref(symbol_ref);
|
let symbol_idx = symbol_display.symbol as usize;
|
||||||
let Some(symbol) = obj.symbols.get(symbol_display.symbol) else {
|
let symbol = &obj.symbols[symbol_idx];
|
||||||
return SymbolDisplay {
|
|
||||||
info: SymbolInfo { name: "<unknown>".to_string(), ..Default::default() },
|
|
||||||
..Default::default()
|
|
||||||
};
|
|
||||||
};
|
|
||||||
let symbol_diff = if symbol_display.is_mapping_symbol {
|
let symbol_diff = if symbol_display.is_mapping_symbol {
|
||||||
obj_diff
|
obj_diff
|
||||||
.mapping_symbols
|
.mapping_symbols
|
||||||
.iter()
|
.iter()
|
||||||
.find(|s| s.symbol_index == symbol_display.symbol)
|
.find(|s| s.symbol_index == symbol_idx)
|
||||||
.map(|s| &s.symbol_diff)
|
.map(|s| &s.symbol_diff)
|
||||||
|
.unwrap()
|
||||||
} else {
|
} else {
|
||||||
obj_diff.symbols.get(symbol_display.symbol)
|
&obj_diff.symbols[symbol_idx]
|
||||||
};
|
};
|
||||||
SymbolDisplay {
|
SymbolDisplay {
|
||||||
info: SymbolInfo {
|
|
||||||
id: to_symbol_ref(symbol_display),
|
|
||||||
name: symbol.name.clone(),
|
name: symbol.name.clone(),
|
||||||
demangled_name: symbol.demangled_name.clone(),
|
demangled_name: symbol.demangled_name.clone(),
|
||||||
address: symbol.address,
|
address: symbol.address,
|
||||||
size: symbol.size,
|
size: symbol.size,
|
||||||
kind: SymbolKind::from(symbol.kind),
|
kind: SymbolKind::from(symbol.kind),
|
||||||
section: symbol.section.map(|s| s as u32),
|
section: symbol.section.map(|s| s as u32),
|
||||||
section_name: symbol
|
|
||||||
.section
|
|
||||||
.and_then(|s| obj.sections.get(s).map(|sec| sec.name.clone())),
|
|
||||||
flags: SymbolFlags::from(symbol.flags),
|
flags: SymbolFlags::from(symbol.flags),
|
||||||
align: symbol.align.map(|a| a.get()),
|
align: symbol.align.map(|a| a.get()),
|
||||||
virtual_address: symbol.virtual_address,
|
virtual_address: symbol.virtual_address,
|
||||||
},
|
target_symbol: symbol_diff.target_symbol.map(|s| s as u32),
|
||||||
target_symbol: symbol_diff.and_then(|sd| sd.target_symbol.map(|s| s as u32)),
|
match_percent: symbol_diff.match_percent,
|
||||||
match_percent: symbol_diff.and_then(|sd| sd.match_percent),
|
diff_score: symbol_diff.diff_score,
|
||||||
diff_score: symbol_diff.and_then(|sd| sd.diff_score),
|
row_count: symbol_diff.instruction_rows.len() as u32,
|
||||||
row_count: symbol_diff.map_or(0, |sd| sd.instruction_rows.len() as u32),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn display_instruction_row(
|
fn display_instruction_row(
|
||||||
diff: ObjectDiffBorrow,
|
diff: ObjectDiffBorrow,
|
||||||
symbol_ref: SymbolRef,
|
symbol_display: SectionDisplaySymbol,
|
||||||
row_index: u32,
|
row_index: u32,
|
||||||
diff_config: DiffConfigBorrow,
|
diff_config: DiffConfigBorrow,
|
||||||
) -> InstructionDiffRow {
|
) -> InstructionDiffRow {
|
||||||
|
let mut segments = Vec::with_capacity(16);
|
||||||
let obj_diff = diff.get::<ResourceObjectDiff>();
|
let obj_diff = diff.get::<ResourceObjectDiff>();
|
||||||
let obj = obj_diff.0.as_ref();
|
let obj = obj_diff.0.as_ref();
|
||||||
let obj_diff = &obj_diff.1;
|
let obj_diff = &obj_diff.1;
|
||||||
let symbol_display = from_symbol_ref(symbol_ref);
|
let symbol_idx = symbol_display.symbol as usize;
|
||||||
let symbol_diff = if symbol_display.is_mapping_symbol {
|
let symbol_diff = if symbol_display.is_mapping_symbol {
|
||||||
obj_diff
|
obj_diff
|
||||||
.mapping_symbols
|
.mapping_symbols
|
||||||
.iter()
|
.iter()
|
||||||
.find(|s| s.symbol_index == symbol_display.symbol)
|
.find(|s| s.symbol_index == symbol_idx)
|
||||||
.map(|s| &s.symbol_diff)
|
.map(|s| &s.symbol_diff)
|
||||||
|
.unwrap()
|
||||||
} else {
|
} else {
|
||||||
obj_diff.symbols.get(symbol_display.symbol)
|
&obj_diff.symbols[symbol_idx]
|
||||||
};
|
|
||||||
let Some(row) = symbol_diff.and_then(|sd| sd.instruction_rows.get(row_index as usize))
|
|
||||||
else {
|
|
||||||
return InstructionDiffRow::default();
|
|
||||||
};
|
};
|
||||||
|
let row = &symbol_diff.instruction_rows[row_index as usize];
|
||||||
let diff_config = diff_config.get::<ResourceDiffConfig>().0.borrow();
|
let diff_config = diff_config.get::<ResourceDiffConfig>().0.borrow();
|
||||||
let mut segments = Vec::with_capacity(16);
|
diff::display::display_row(obj, symbol_idx, row, &diff_config, |segment| {
|
||||||
diff::display::display_row(obj, symbol_display.symbol, row, &diff_config, |segment| {
|
|
||||||
segments.push(DiffTextSegment::from(segment));
|
segments.push(DiffTextSegment::from(segment));
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
@ -217,23 +212,25 @@ impl GuestDisplay for Component {
|
|||||||
InstructionDiffRow { segments, diff_kind: InstructionDiffKind::from(row.kind) }
|
InstructionDiffRow { segments, diff_kind: InstructionDiffKind::from(row.kind) }
|
||||||
}
|
}
|
||||||
|
|
||||||
fn symbol_context(diff: ObjectDiffBorrow, symbol_ref: SymbolRef) -> Vec<ContextItem> {
|
fn symbol_context(
|
||||||
|
diff: ObjectDiffBorrow,
|
||||||
|
symbol_display: SectionDisplaySymbol,
|
||||||
|
) -> Vec<ContextItem> {
|
||||||
let obj_diff = diff.get::<ResourceObjectDiff>();
|
let obj_diff = diff.get::<ResourceObjectDiff>();
|
||||||
let obj = obj_diff.0.as_ref();
|
let obj = obj_diff.0.as_ref();
|
||||||
let symbol_display = from_symbol_ref(symbol_ref);
|
|
||||||
diff::display::symbol_context(obj, symbol_display.symbol as usize)
|
diff::display::symbol_context(obj, symbol_display.symbol as usize)
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|item| ContextItem::from(item))
|
.map(|item| ContextItem::from(item))
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn symbol_hover(diff: ObjectDiffBorrow, symbol_ref: SymbolRef) -> Vec<HoverItem> {
|
fn symbol_hover(
|
||||||
|
diff: ObjectDiffBorrow,
|
||||||
|
symbol_display: SectionDisplaySymbol,
|
||||||
|
) -> Vec<HoverItem> {
|
||||||
let obj_diff = diff.get::<ResourceObjectDiff>();
|
let obj_diff = diff.get::<ResourceObjectDiff>();
|
||||||
let obj = obj_diff.0.as_ref();
|
let obj = obj_diff.0.as_ref();
|
||||||
let addend = 0; // TODO
|
diff::display::symbol_hover(obj, symbol_display.symbol as usize, 0 /* TODO */)
|
||||||
let override_color = None; // TODO: colorize replaced/deleted/inserted relocations
|
|
||||||
let symbol_display = from_symbol_ref(symbol_ref);
|
|
||||||
diff::display::symbol_hover(obj, symbol_display.symbol as usize, addend, override_color)
|
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|item| HoverItem::from(item))
|
.map(|item| HoverItem::from(item))
|
||||||
.collect()
|
.collect()
|
||||||
@ -241,98 +238,74 @@ impl GuestDisplay for Component {
|
|||||||
|
|
||||||
fn instruction_context(
|
fn instruction_context(
|
||||||
diff: ObjectDiffBorrow,
|
diff: ObjectDiffBorrow,
|
||||||
symbol_ref: SymbolRef,
|
symbol_display: SectionDisplaySymbol,
|
||||||
row_index: u32,
|
row_index: u32,
|
||||||
diff_config: DiffConfigBorrow,
|
diff_config: DiffConfigBorrow,
|
||||||
) -> Vec<ContextItem> {
|
) -> Result<Vec<ContextItem>, String> {
|
||||||
let obj_diff = diff.get::<ResourceObjectDiff>();
|
let obj_diff = diff.get::<ResourceObjectDiff>();
|
||||||
let obj = obj_diff.0.as_ref();
|
let obj = obj_diff.0.as_ref();
|
||||||
let obj_diff = &obj_diff.1;
|
let obj_diff = &obj_diff.1;
|
||||||
let symbol_display = from_symbol_ref(symbol_ref);
|
let symbol_idx = symbol_display.symbol as usize;
|
||||||
let symbol_diff = if symbol_display.is_mapping_symbol {
|
let symbol_diff = if symbol_display.is_mapping_symbol {
|
||||||
obj_diff
|
obj_diff
|
||||||
.mapping_symbols
|
.mapping_symbols
|
||||||
.iter()
|
.iter()
|
||||||
.find(|s| s.symbol_index == symbol_display.symbol)
|
.find(|s| s.symbol_index == symbol_idx)
|
||||||
.map(|s| &s.symbol_diff)
|
.map(|s| &s.symbol_diff)
|
||||||
|
.unwrap()
|
||||||
} else {
|
} else {
|
||||||
obj_diff.symbols.get(symbol_display.symbol)
|
&obj_diff.symbols[symbol_idx]
|
||||||
};
|
};
|
||||||
let Some(ins_ref) = symbol_diff
|
let row = &symbol_diff.instruction_rows[row_index as usize];
|
||||||
.and_then(|sd| sd.instruction_rows.get(row_index as usize))
|
let Some(ins_ref) = row.ins_ref else {
|
||||||
.and_then(|row| row.ins_ref)
|
return Ok(Vec::new());
|
||||||
else {
|
|
||||||
return Vec::new();
|
|
||||||
};
|
};
|
||||||
let diff_config = diff_config.get::<ResourceDiffConfig>().0.borrow();
|
let diff_config = diff_config.get::<ResourceDiffConfig>().0.borrow();
|
||||||
let Some(resolved) = obj.resolve_instruction_ref(symbol_display.symbol, ins_ref) else {
|
let Some(resolved) = obj.resolve_instruction_ref(symbol_idx, ins_ref) else {
|
||||||
return vec![ContextItem::Copy(ContextItemCopy {
|
return Err("Failed to resolve instruction".into());
|
||||||
value: "Failed to resolve instruction".to_string(),
|
|
||||||
label: Some("error".to_string()),
|
|
||||||
})];
|
|
||||||
};
|
};
|
||||||
let ins = match obj.arch.process_instruction(resolved, &diff_config) {
|
let ins =
|
||||||
Ok(ins) => ins,
|
obj.arch.process_instruction(resolved, &diff_config).map_err(|e| e.to_string())?;
|
||||||
Err(e) => {
|
Ok(diff::display::instruction_context(obj, resolved, &ins)
|
||||||
return vec![ContextItem::Copy(ContextItemCopy {
|
|
||||||
value: e.to_string(),
|
|
||||||
label: Some("error".to_string()),
|
|
||||||
})];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
diff::display::instruction_context(obj, resolved, &ins)
|
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|item| ContextItem::from(item))
|
.map(|item| ContextItem::from(item))
|
||||||
.collect()
|
.collect())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn instruction_hover(
|
fn instruction_hover(
|
||||||
diff: ObjectDiffBorrow,
|
diff: ObjectDiffBorrow,
|
||||||
symbol_ref: SymbolRef,
|
symbol_display: SectionDisplaySymbol,
|
||||||
row_index: u32,
|
row_index: u32,
|
||||||
diff_config: DiffConfigBorrow,
|
diff_config: DiffConfigBorrow,
|
||||||
) -> Vec<HoverItem> {
|
) -> Result<Vec<HoverItem>, String> {
|
||||||
let obj_diff = diff.get::<ResourceObjectDiff>();
|
let obj_diff = diff.get::<ResourceObjectDiff>();
|
||||||
let obj = obj_diff.0.as_ref();
|
let obj = obj_diff.0.as_ref();
|
||||||
let obj_diff = &obj_diff.1;
|
let obj_diff = &obj_diff.1;
|
||||||
let symbol_display = from_symbol_ref(symbol_ref);
|
let symbol_idx = symbol_display.symbol as usize;
|
||||||
let symbol_diff = if symbol_display.is_mapping_symbol {
|
let symbol_diff = if symbol_display.is_mapping_symbol {
|
||||||
obj_diff
|
obj_diff
|
||||||
.mapping_symbols
|
.mapping_symbols
|
||||||
.iter()
|
.iter()
|
||||||
.find(|s| s.symbol_index == symbol_display.symbol)
|
.find(|s| s.symbol_index == symbol_idx)
|
||||||
.map(|s| &s.symbol_diff)
|
.map(|s| &s.symbol_diff)
|
||||||
|
.unwrap()
|
||||||
} else {
|
} else {
|
||||||
obj_diff.symbols.get(symbol_display.symbol)
|
&obj_diff.symbols[symbol_idx]
|
||||||
};
|
};
|
||||||
let Some(ins_ref) = symbol_diff
|
let row = &symbol_diff.instruction_rows[row_index as usize];
|
||||||
.and_then(|sd| sd.instruction_rows.get(row_index as usize))
|
let Some(ins_ref) = row.ins_ref else {
|
||||||
.and_then(|row| row.ins_ref)
|
return Ok(Vec::new());
|
||||||
else {
|
|
||||||
return Vec::new();
|
|
||||||
};
|
};
|
||||||
let diff_config = diff_config.get::<ResourceDiffConfig>().0.borrow();
|
let diff_config = diff_config.get::<ResourceDiffConfig>().0.borrow();
|
||||||
let Some(resolved) = obj.resolve_instruction_ref(symbol_display.symbol, ins_ref) else {
|
let Some(resolved) = obj.resolve_instruction_ref(symbol_idx, ins_ref) else {
|
||||||
return vec![HoverItem::Text(HoverItemText {
|
return Err("Failed to resolve instruction".into());
|
||||||
label: "Error".to_string(),
|
|
||||||
value: "Failed to resolve instruction".to_string(),
|
|
||||||
color: HoverItemColor::Delete,
|
|
||||||
})];
|
|
||||||
};
|
};
|
||||||
let ins = match obj.arch.process_instruction(resolved, &diff_config) {
|
let ins =
|
||||||
Ok(ins) => ins,
|
obj.arch.process_instruction(resolved, &diff_config).map_err(|e| e.to_string())?;
|
||||||
Err(e) => {
|
Ok(diff::display::instruction_hover(obj, resolved, &ins)
|
||||||
return vec![HoverItem::Text(HoverItemText {
|
|
||||||
label: "Error".to_string(),
|
|
||||||
value: e.to_string(),
|
|
||||||
color: HoverItemColor::Delete,
|
|
||||||
})];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
diff::display::instruction_hover(obj, resolved, &ins)
|
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|item| HoverItem::from(item))
|
.map(|item| HoverItem::from(item))
|
||||||
.collect()
|
.collect())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -448,55 +421,21 @@ impl GuestDiffConfig for ResourceDiffConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct CachedObject(Weak<obj::Object>, u64);
|
|
||||||
|
|
||||||
struct ObjectCache(RefCell<Vec<CachedObject>>);
|
|
||||||
|
|
||||||
impl ObjectCache {
|
|
||||||
#[inline]
|
|
||||||
const fn new() -> Self { Self(RefCell::new(Vec::new())) }
|
|
||||||
}
|
|
||||||
|
|
||||||
impl core::ops::Deref for ObjectCache {
|
|
||||||
type Target = RefCell<Vec<CachedObject>>;
|
|
||||||
|
|
||||||
fn deref(&self) -> &Self::Target { &self.0 }
|
|
||||||
}
|
|
||||||
|
|
||||||
// Assume single-threaded environment
|
|
||||||
unsafe impl Sync for ObjectCache {}
|
|
||||||
|
|
||||||
static OBJECT_CACHE: ObjectCache = ObjectCache::new();
|
|
||||||
|
|
||||||
impl GuestObject for ResourceObject {
|
impl GuestObject for ResourceObject {
|
||||||
fn parse(data: Vec<u8>, diff_config: DiffConfigBorrow) -> Result<Object, String> {
|
fn parse(data: Vec<u8>, diff_config: DiffConfigBorrow) -> Result<Object, String> {
|
||||||
let hash = xxh3_64(&data);
|
|
||||||
let mut cached = None;
|
|
||||||
OBJECT_CACHE.borrow_mut().retain(|c| {
|
|
||||||
if c.0.strong_count() == 0 {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if c.1 == hash {
|
|
||||||
cached = c.0.upgrade();
|
|
||||||
}
|
|
||||||
true
|
|
||||||
});
|
|
||||||
if let Some(obj) = cached {
|
|
||||||
return Ok(Object::new(ResourceObject(obj, hash)));
|
|
||||||
}
|
|
||||||
let diff_config = diff_config.get::<ResourceDiffConfig>().0.borrow();
|
let diff_config = diff_config.get::<ResourceDiffConfig>().0.borrow();
|
||||||
let obj = Rc::new(obj::read::parse(&data, &diff_config).map_err(|e| e.to_string())?);
|
obj::read::parse(&data, &diff_config)
|
||||||
OBJECT_CACHE.borrow_mut().push(CachedObject(Rc::downgrade(&obj), hash));
|
.map(|o| Object::new(ResourceObject(Rc::new(o))))
|
||||||
Ok(Object::new(ResourceObject(obj, hash)))
|
.map_err(|e| e.to_string())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn hash(&self) -> u64 { self.1 }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl GuestObjectDiff for ResourceObjectDiff {
|
impl GuestObjectDiff for ResourceObjectDiff {
|
||||||
fn find_symbol(&self, name: String, section_name: Option<String>) -> Option<SymbolInfo> {
|
fn find_symbol(&self, name: String, section_name: Option<String>) -> Option<SymbolRef> {
|
||||||
let obj = self.0.as_ref();
|
let obj = self.0.as_ref();
|
||||||
let symbol_idx = obj.symbols.iter().position(|s| {
|
obj.symbols
|
||||||
|
.iter()
|
||||||
|
.position(|s| {
|
||||||
s.name == name
|
s.name == name
|
||||||
&& match section_name.as_deref() {
|
&& match section_name.as_deref() {
|
||||||
Some(section_name) => {
|
Some(section_name) => {
|
||||||
@ -504,46 +443,8 @@ impl GuestObjectDiff for ResourceObjectDiff {
|
|||||||
}
|
}
|
||||||
None => true,
|
None => true,
|
||||||
}
|
}
|
||||||
})?;
|
|
||||||
let symbol = obj.symbols.get(symbol_idx)?;
|
|
||||||
Some(SymbolInfo {
|
|
||||||
id: symbol_idx as SymbolRef,
|
|
||||||
name: symbol.name.clone(),
|
|
||||||
demangled_name: symbol.demangled_name.clone(),
|
|
||||||
address: symbol.address,
|
|
||||||
size: symbol.size,
|
|
||||||
kind: SymbolKind::from(symbol.kind),
|
|
||||||
section: symbol.section.map(|s| s as u32),
|
|
||||||
section_name: symbol
|
|
||||||
.section
|
|
||||||
.and_then(|s| obj.sections.get(s).map(|sec| sec.name.clone())),
|
|
||||||
flags: SymbolFlags::from(symbol.flags),
|
|
||||||
align: symbol.align.map(|a| a.get()),
|
|
||||||
virtual_address: symbol.virtual_address,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
fn get_symbol(&self, symbol_ref: SymbolRef) -> Option<SymbolInfo> {
|
|
||||||
let obj = self.0.as_ref();
|
|
||||||
let symbol_display = from_symbol_ref(symbol_ref);
|
|
||||||
let Some(symbol) = obj.symbols.get(symbol_display.symbol) else {
|
|
||||||
return None;
|
|
||||||
};
|
|
||||||
Some(SymbolInfo {
|
|
||||||
id: to_symbol_ref(symbol_display),
|
|
||||||
name: symbol.name.clone(),
|
|
||||||
demangled_name: symbol.demangled_name.clone(),
|
|
||||||
address: symbol.address,
|
|
||||||
size: symbol.size,
|
|
||||||
kind: SymbolKind::from(symbol.kind),
|
|
||||||
section: symbol.section.map(|s| s as u32),
|
|
||||||
section_name: symbol
|
|
||||||
.section
|
|
||||||
.and_then(|s| obj.sections.get(s).map(|sec| sec.name.clone())),
|
|
||||||
flags: SymbolFlags::from(symbol.flags),
|
|
||||||
align: symbol.align.map(|a| a.get()),
|
|
||||||
virtual_address: symbol.virtual_address,
|
|
||||||
})
|
})
|
||||||
|
.map(|i| i as SymbolRef)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -564,8 +465,6 @@ impl From<diff::display::HoverItemColor> for HoverItemColor {
|
|||||||
diff::display::HoverItemColor::Normal => HoverItemColor::Normal,
|
diff::display::HoverItemColor::Normal => HoverItemColor::Normal,
|
||||||
diff::display::HoverItemColor::Emphasized => HoverItemColor::Emphasized,
|
diff::display::HoverItemColor::Emphasized => HoverItemColor::Emphasized,
|
||||||
diff::display::HoverItemColor::Special => HoverItemColor::Special,
|
diff::display::HoverItemColor::Special => HoverItemColor::Special,
|
||||||
diff::display::HoverItemColor::Delete => HoverItemColor::Delete,
|
|
||||||
diff::display::HoverItemColor::Insert => HoverItemColor::Insert,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -597,76 +496,4 @@ impl From<diff::display::SymbolNavigationKind> for SymbolNavigationKind {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for InstructionDiffKind {
|
|
||||||
fn default() -> Self { Self::None }
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Default for InstructionDiffRow {
|
|
||||||
fn default() -> Self { Self { segments: Default::default(), diff_kind: Default::default() } }
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Default for SymbolKind {
|
|
||||||
fn default() -> Self { Self::Unknown }
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Default for SymbolFlags {
|
|
||||||
fn default() -> Self { Self::empty() }
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Default for SymbolInfo {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self {
|
|
||||||
id: u32::MAX,
|
|
||||||
name: Default::default(),
|
|
||||||
demangled_name: Default::default(),
|
|
||||||
address: Default::default(),
|
|
||||||
size: Default::default(),
|
|
||||||
kind: Default::default(),
|
|
||||||
section: Default::default(),
|
|
||||||
section_name: Default::default(),
|
|
||||||
flags: Default::default(),
|
|
||||||
align: Default::default(),
|
|
||||||
virtual_address: Default::default(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Default for SymbolDisplay {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self {
|
|
||||||
info: Default::default(),
|
|
||||||
target_symbol: Default::default(),
|
|
||||||
match_percent: Default::default(),
|
|
||||||
diff_score: Default::default(),
|
|
||||||
row_count: Default::default(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<MappingConfig> for diff::MappingConfig {
|
|
||||||
fn from(config: MappingConfig) -> Self {
|
|
||||||
Self {
|
|
||||||
mappings: config.mappings.into_iter().collect(),
|
|
||||||
selecting_left: config.selecting_left,
|
|
||||||
selecting_right: config.selecting_right,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn from_symbol_ref(symbol_ref: SymbolRef) -> diff::display::SectionDisplaySymbol {
|
|
||||||
diff::display::SectionDisplaySymbol {
|
|
||||||
symbol: (symbol_ref & !(1 << 31)) as usize,
|
|
||||||
is_mapping_symbol: (symbol_ref & (1 << 31)) != 0,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn to_symbol_ref(display_symbol: diff::display::SectionDisplaySymbol) -> SymbolRef {
|
|
||||||
if display_symbol.is_mapping_symbol {
|
|
||||||
// Use the highest bit to indicate a mapping symbol
|
|
||||||
display_symbol.symbol as u32 | (1 << 31)
|
|
||||||
} else {
|
|
||||||
display_symbol.symbol as u32
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export!(Component);
|
export!(Component);
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
//! this is defined as a "weak" symbol. This means that other definitions are
|
//! this is defined as a "weak" symbol. This means that other definitions are
|
||||||
//! allowed to overwrite it if they are present in a compilation.
|
//! allowed to overwrite it if they are present in a compilation.
|
||||||
|
|
||||||
use alloc::{Layout, alloc};
|
use alloc::{alloc, Layout};
|
||||||
use core::ptr;
|
use core::ptr;
|
||||||
|
|
||||||
#[used]
|
#[used]
|
||||||
@ -31,32 +31,24 @@ static FORCE_CODEGEN_OF_CABI_REALLOC: unsafe extern "C" fn(
|
|||||||
usize,
|
usize,
|
||||||
) -> *mut u8 = cabi_realloc;
|
) -> *mut u8 = cabi_realloc;
|
||||||
|
|
||||||
#[unsafe(no_mangle)]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn cabi_realloc(
|
pub unsafe extern "C" fn cabi_realloc(
|
||||||
old_ptr: *mut u8,
|
old_ptr: *mut u8,
|
||||||
old_len: usize,
|
old_len: usize,
|
||||||
mut align: usize,
|
align: usize,
|
||||||
new_len: usize,
|
new_len: usize,
|
||||||
) -> *mut u8 {
|
) -> *mut u8 {
|
||||||
// HACK: The object crate requires the data alignment for 64-bit objects to be 8,
|
|
||||||
// but in wasm32, our allocator will have a minimum alignment of 4. We can't specify
|
|
||||||
// the alignment of `list<u8>` in the component model, so we work around this here.
|
|
||||||
// https://github.com/WebAssembly/component-model/issues/258
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
|
||||||
if align == 1 {
|
|
||||||
align = 8;
|
|
||||||
}
|
|
||||||
let layout;
|
let layout;
|
||||||
let ptr = if old_len == 0 {
|
let ptr = if old_len == 0 {
|
||||||
if new_len == 0 {
|
if new_len == 0 {
|
||||||
return ptr::without_provenance_mut(align);
|
return ptr::without_provenance_mut(align);
|
||||||
}
|
}
|
||||||
layout = unsafe { Layout::from_size_align_unchecked(new_len, align) };
|
layout = Layout::from_size_align_unchecked(new_len, align);
|
||||||
unsafe { alloc::alloc(layout) }
|
alloc::alloc(layout)
|
||||||
} else {
|
} else {
|
||||||
debug_assert_ne!(new_len, 0, "non-zero old_len requires non-zero new_len!");
|
debug_assert_ne!(new_len, 0, "non-zero old_len requires non-zero new_len!");
|
||||||
layout = unsafe { Layout::from_size_align_unchecked(old_len, align) };
|
layout = Layout::from_size_align_unchecked(old_len, align);
|
||||||
unsafe { alloc::realloc(old_ptr, layout, new_len) }
|
alloc::realloc(old_ptr, layout, new_len)
|
||||||
};
|
};
|
||||||
if ptr.is_null() {
|
if ptr.is_null() {
|
||||||
// Print a nice message in debug mode, but in release mode don't
|
// Print a nice message in debug mode, but in release mode don't
|
||||||
|
@ -20,12 +20,60 @@ interface diff {
|
|||||||
data: list<u8>,
|
data: list<u8>,
|
||||||
config: borrow<diff-config>,
|
config: borrow<diff-config>,
|
||||||
) -> result<object, string>;
|
) -> result<object, string>;
|
||||||
|
|
||||||
hash: func() -> u64;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource object-diff {
|
||||||
|
find-symbol: func(
|
||||||
|
name: string,
|
||||||
|
section-name: option<string>
|
||||||
|
) -> option<u32>;
|
||||||
|
}
|
||||||
|
|
||||||
|
record diff-result {
|
||||||
|
left: option<object-diff>,
|
||||||
|
right: option<object-diff>,
|
||||||
|
}
|
||||||
|
|
||||||
|
run-diff: func(
|
||||||
|
left: option<borrow<object>>,
|
||||||
|
right: option<borrow<object>>,
|
||||||
|
config: borrow<diff-config>,
|
||||||
|
) -> result<diff-result, string>;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface display {
|
||||||
|
use diff.{
|
||||||
|
object,
|
||||||
|
object-diff,
|
||||||
|
diff-config
|
||||||
|
};
|
||||||
|
|
||||||
type symbol-ref = u32;
|
type symbol-ref = u32;
|
||||||
|
|
||||||
|
record display-config {
|
||||||
|
show-hidden-symbols: bool,
|
||||||
|
show-mapped-symbols: bool,
|
||||||
|
reverse-fn-order: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
record symbol-filter {
|
||||||
|
regex: option<string>,
|
||||||
|
mapping: option<symbol-ref>,
|
||||||
|
}
|
||||||
|
|
||||||
|
record section-display-symbol {
|
||||||
|
symbol: symbol-ref,
|
||||||
|
is-mapping-symbol: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
record section-display {
|
||||||
|
id: string,
|
||||||
|
name: string,
|
||||||
|
size: u64,
|
||||||
|
match-percent: option<f32>,
|
||||||
|
symbols: list<section-display-symbol>,
|
||||||
|
}
|
||||||
|
|
||||||
enum symbol-kind {
|
enum symbol-kind {
|
||||||
unknown,
|
unknown,
|
||||||
function,
|
function,
|
||||||
@ -44,74 +92,17 @@ interface diff {
|
|||||||
ignored,
|
ignored,
|
||||||
}
|
}
|
||||||
|
|
||||||
record symbol-info {
|
record symbol-display {
|
||||||
id: symbol-ref,
|
|
||||||
name: string,
|
name: string,
|
||||||
demangled-name: option<string>,
|
demangled-name: option<string>,
|
||||||
address: u64,
|
address: u64,
|
||||||
size: u64,
|
size: u64,
|
||||||
kind: symbol-kind,
|
kind: symbol-kind,
|
||||||
section: option<u32>,
|
section: option<u32>,
|
||||||
section-name: option<string>,
|
|
||||||
%flags: symbol-flags,
|
%flags: symbol-flags,
|
||||||
align: option<u32>,
|
align: option<u32>,
|
||||||
virtual-address: option<u64>,
|
virtual-address: option<u64>,
|
||||||
}
|
|
||||||
|
|
||||||
resource object-diff {
|
|
||||||
find-symbol: func(
|
|
||||||
name: string,
|
|
||||||
section-name: option<string>
|
|
||||||
) -> option<symbol-info>;
|
|
||||||
|
|
||||||
get-symbol: func(
|
|
||||||
id: u32
|
|
||||||
) -> option<symbol-info>;
|
|
||||||
}
|
|
||||||
|
|
||||||
record diff-result {
|
|
||||||
left: option<object-diff>,
|
|
||||||
right: option<object-diff>,
|
|
||||||
}
|
|
||||||
|
|
||||||
run-diff: func(
|
|
||||||
left: option<borrow<object>>,
|
|
||||||
right: option<borrow<object>>,
|
|
||||||
config: borrow<diff-config>,
|
|
||||||
mapping: mapping-config,
|
|
||||||
) -> result<diff-result, string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface display {
|
|
||||||
use diff.{
|
|
||||||
object,
|
|
||||||
object-diff,
|
|
||||||
diff-config,
|
|
||||||
symbol-info,
|
|
||||||
symbol-ref
|
|
||||||
};
|
|
||||||
|
|
||||||
record display-config {
|
|
||||||
show-hidden-symbols: bool,
|
|
||||||
show-mapped-symbols: bool,
|
|
||||||
reverse-fn-order: bool,
|
|
||||||
}
|
|
||||||
|
|
||||||
record symbol-filter {
|
|
||||||
regex: option<string>,
|
|
||||||
mapping: option<symbol-ref>,
|
|
||||||
}
|
|
||||||
|
|
||||||
record section-display {
|
|
||||||
id: string,
|
|
||||||
name: string,
|
|
||||||
size: u64,
|
|
||||||
match-percent: option<f32>,
|
|
||||||
symbols: list<symbol-ref>,
|
|
||||||
}
|
|
||||||
|
|
||||||
record symbol-display {
|
|
||||||
info: symbol-info,
|
|
||||||
target-symbol: option<symbol-ref>,
|
target-symbol: option<symbol-ref>,
|
||||||
match-percent: option<f32>,
|
match-percent: option<f32>,
|
||||||
diff-score: option<tuple<u64, u64>>,
|
diff-score: option<tuple<u64, u64>>,
|
||||||
@ -144,8 +135,6 @@ interface display {
|
|||||||
normal,
|
normal,
|
||||||
emphasized,
|
emphasized,
|
||||||
special,
|
special,
|
||||||
delete,
|
|
||||||
insert,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
record hover-item-text {
|
record hover-item-text {
|
||||||
@ -239,39 +228,39 @@ interface display {
|
|||||||
|
|
||||||
display-symbol: func(
|
display-symbol: func(
|
||||||
diff: borrow<object-diff>,
|
diff: borrow<object-diff>,
|
||||||
symbol: symbol-ref,
|
symbol: section-display-symbol,
|
||||||
) -> symbol-display;
|
) -> symbol-display;
|
||||||
|
|
||||||
display-instruction-row: func(
|
display-instruction-row: func(
|
||||||
diff: borrow<object-diff>,
|
diff: borrow<object-diff>,
|
||||||
symbol: symbol-ref,
|
symbol: section-display-symbol,
|
||||||
row-index: u32,
|
row-index: u32,
|
||||||
config: borrow<diff-config>,
|
config: borrow<diff-config>,
|
||||||
) -> instruction-diff-row;
|
) -> instruction-diff-row;
|
||||||
|
|
||||||
symbol-context: func(
|
symbol-context: func(
|
||||||
diff: borrow<object-diff>,
|
diff: borrow<object-diff>,
|
||||||
symbol: symbol-ref,
|
symbol: section-display-symbol,
|
||||||
) -> list<context-item>;
|
) -> list<context-item>;
|
||||||
|
|
||||||
symbol-hover: func(
|
symbol-hover: func(
|
||||||
diff: borrow<object-diff>,
|
diff: borrow<object-diff>,
|
||||||
symbol: symbol-ref,
|
symbol: section-display-symbol,
|
||||||
) -> list<hover-item>;
|
) -> list<hover-item>;
|
||||||
|
|
||||||
instruction-context: func(
|
instruction-context: func(
|
||||||
diff: borrow<object-diff>,
|
diff: borrow<object-diff>,
|
||||||
symbol: symbol-ref,
|
symbol: section-display-symbol,
|
||||||
row-index: u32,
|
row-index: u32,
|
||||||
config: borrow<diff-config>,
|
config: borrow<diff-config>,
|
||||||
) -> list<context-item>;
|
) -> result<list<context-item>, string>;
|
||||||
|
|
||||||
instruction-hover: func(
|
instruction-hover: func(
|
||||||
diff: borrow<object-diff>,
|
diff: borrow<object-diff>,
|
||||||
symbol: symbol-ref,
|
symbol: section-display-symbol,
|
||||||
row-index: u32,
|
row-index: u32,
|
||||||
config: borrow<diff-config>,
|
config: borrow<diff-config>,
|
||||||
) -> list<hover-item>;
|
) -> result<list<hover-item>, string>;
|
||||||
}
|
}
|
||||||
|
|
||||||
world api {
|
world api {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user