Fix superh wasm (no_std) build

This commit is contained in:
Luke Street 2025-05-06 23:21:07 -06:00
parent d225cac205
commit a51ff44be1
2 changed files with 4 additions and 3 deletions

View File

@ -1,3 +1,5 @@
use alloc::{format, vec::Vec};
use crate::{diff::display::InstructionPart, obj::ResolvedInstructionRef};
static REG_NAMES: [&str; 16] = [

View File

@ -1,5 +1,4 @@
use alloc::{string::String, vec::Vec};
use std::collections::HashMap;
use alloc::{collections::BTreeMap, format, string::String, vec, vec::Vec};
use anyhow::{Result, bail};
use object::elf;
@ -80,7 +79,7 @@ impl Arch for ArchSuperH {
if let Some(symbol_data) = resolved.section.symbol_data(resolved.symbol) {
// scan for data
// map of instruction offsets to data target offsets
let mut data_offsets: HashMap<u64, DataInfo> = HashMap::<u64, DataInfo>::new();
let mut data_offsets = BTreeMap::<u64, DataInfo>::new();
let mut pos: u64 = 0;
for chunk in symbol_data.chunks_exact(2) {