|
4 | 4 | //!
|
5 | 5 | //! Also see the docs in `asm.rs`.
|
6 | 6 |
|
7 |
| -use object::{ |
8 |
| - read::{Object as _, ObjectSection as _}, |
9 |
| - write::{Object, Symbol, SymbolSection}, |
10 |
| - SymbolFlags, |
11 |
| -}; |
| 7 | +use object::read::{Object as _, ObjectSection as _}; |
| 8 | +use object::write::{Object, Symbol, SymbolSection}; |
| 9 | +use object::{ObjectSymbol, SymbolFlags}; |
| 10 | +use std::collections::BTreeMap; |
12 | 11 | use std::env::current_dir;
|
13 |
| -use std::{ |
14 |
| - collections::BTreeMap, |
15 |
| - fs::{self, File}, |
16 |
| - process::{Command, Stdio}, |
17 |
| -}; |
| 12 | +use std::fs::{self, File}; |
| 13 | +use std::process::{Command, Stdio}; |
18 | 14 |
|
19 | 15 | fn toolchain() -> String {
|
20 | 16 | fs::read_to_string("asm-toolchain")
|
@@ -78,7 +74,7 @@ fn trim_panic_handler(obj_file: &str) {
|
78 | 74 | writer.append_section_data(sec_id, section.data().unwrap(), align);
|
79 | 75 |
|
80 | 76 | // Import all symbols from the section.
|
81 |
| - for (_sym_idx, symbol) in obj.symbols() { |
| 77 | + for symbol in obj.symbols() { |
82 | 78 | if symbol.section_index() == Some(section.index()) {
|
83 | 79 | writer.add_symbol(Symbol {
|
84 | 80 | name: symbol.name().unwrap_or("").as_bytes().to_vec(),
|
|
0 commit comments