1
1
use alloc:: { string:: String , vec:: Vec } ;
2
+ use std:: collections:: HashMap ;
2
3
3
4
use anyhow:: { Result , bail} ;
4
5
use object:: elf;
@@ -7,12 +8,10 @@ use crate::{
7
8
arch:: { Arch , superh:: disasm:: sh2_disasm} ,
8
9
diff:: { DiffObjConfig , display:: InstructionPart } ,
9
10
obj:: {
10
- InstructionRef , Relocation , RelocationFlags , ResolvedInstructionRef , ScannedInstruction
11
+ InstructionRef , Relocation , RelocationFlags , ResolvedInstructionRef , ScannedInstruction ,
11
12
} ,
12
13
} ;
13
14
14
- use std:: collections:: HashMap ;
15
-
16
15
pub mod disasm;
17
16
18
17
#[ derive( Debug ) ]
@@ -22,7 +21,6 @@ impl ArchSuperH {
22
21
pub fn new ( _file : & object:: File ) -> Result < Self > { Ok ( Self { } ) }
23
22
}
24
23
25
-
26
24
struct DataInfo {
27
25
address : u64 ,
28
26
size : u32 ,
@@ -104,8 +102,6 @@ impl Arch for ArchSuperH {
104
102
}
105
103
106
104
let pos = resolved. ins_ref . address - resolved. symbol . address ;
107
- let a = resolved. ins_ref . address ;
108
- let b = resolved. symbol . address ;
109
105
110
106
// add the data info
111
107
if let Some ( value) = data_offsets. get ( & pos) {
@@ -217,8 +213,7 @@ mod test {
217
213
use std:: fmt:: { self , Display } ;
218
214
219
215
use super :: * ;
220
- use crate :: obj:: InstructionArg ;
221
- use crate :: obj:: Symbol ;
216
+ use crate :: obj:: { InstructionArg , Symbol } ;
222
217
223
218
impl Display for InstructionPart < ' _ > {
224
219
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
0 commit comments