Skip to content

Commit a51ff44

Browse files
committed
Fix superh wasm (no_std) build
1 parent d225cac commit a51ff44

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

objdiff-core/src/arch/superh/disasm.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use alloc::{format, vec::Vec};
2+
13
use crate::{diff::display::InstructionPart, obj::ResolvedInstructionRef};
24

35
static REG_NAMES: [&str; 16] = [

objdiff-core/src/arch/superh/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
use alloc::{string::String, vec::Vec};
2-
use std::collections::HashMap;
1+
use alloc::{collections::BTreeMap, format, string::String, vec, vec::Vec};
32

43
use anyhow::{Result, bail};
54
use object::elf;
@@ -80,7 +79,7 @@ impl Arch for ArchSuperH {
8079
if let Some(symbol_data) = resolved.section.symbol_data(resolved.symbol) {
8180
// scan for data
8281
// map of instruction offsets to data target offsets
83-
let mut data_offsets: HashMap<u64, DataInfo> = HashMap::<u64, DataInfo>::new();
82+
let mut data_offsets = BTreeMap::<u64, DataInfo>::new();
8483

8584
let mut pos: u64 = 0;
8685
for chunk in symbol_data.chunks_exact(2) {

0 commit comments

Comments
 (0)