diff options
-rw-r--r-- | xtask/Cargo.toml | 2 | ||||
-rw-r--r-- | xtask/src/lib.rs | 18 |
2 files changed, 8 insertions, 12 deletions
diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index e23d1a7..05cfbac 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -13,5 +13,5 @@ harness = false ar = "0.8.0" [dependencies.object] -version = "0.21.1" +version = "0.22.0" features = ["write"] diff --git a/xtask/src/lib.rs b/xtask/src/lib.rs index 3ff66e8..2ac15a4 100644 --- a/xtask/src/lib.rs +++ b/xtask/src/lib.rs @@ -4,17 +4,13 @@ //! //! Also see the docs in `asm.rs`. -use object::{ - read::{Object as _, ObjectSection as _}, - write::{Object, Symbol, SymbolSection}, - SymbolFlags, -}; +use object::read::{Object as _, ObjectSection as _}; +use object::write::{Object, Symbol, SymbolSection}; +use object::{ObjectSymbol, SymbolFlags}; +use std::collections::BTreeMap; use std::env::current_dir; -use std::{ - collections::BTreeMap, - fs::{self, File}, - process::{Command, Stdio}, -}; +use std::fs::{self, File}; +use std::process::{Command, Stdio}; fn toolchain() -> String { fs::read_to_string("asm-toolchain") @@ -78,7 +74,7 @@ fn trim_panic_handler(obj_file: &str) { writer.append_section_data(sec_id, section.data().unwrap(), align); // Import all symbols from the section. - for (_sym_idx, symbol) in obj.symbols() { + for symbol in obj.symbols() { if symbol.section_index() == Some(section.index()) { writer.add_symbol(Symbol { name: symbol.name().unwrap_or("").as_bytes().to_vec(), |