diff options
author | 2020-11-02 23:35:00 +0000 | |
---|---|---|
committer | 2020-11-02 23:35:00 +0000 | |
commit | 94d3357f0b4e27895e9a9e5eab3d7cb91e10abd4 (patch) | |
tree | 1cd46cb42dae978088475414e2c048c5584ee2a6 | |
parent | fd6a9dbdab0a9c1b377c04a2820324cd8337706f (diff) | |
parent | 290755a90daf5e6813a1926216da244cbd0dc4ac (diff) | |
download | cortex-m-94d3357f0b4e27895e9a9e5eab3d7cb91e10abd4.tar.gz cortex-m-94d3357f0b4e27895e9a9e5eab3d7cb91e10abd4.tar.zst cortex-m-94d3357f0b4e27895e9a9e5eab3d7cb91e10abd4.zip |
Merge #283
283: Update object to 0.22.0 r=adamgreig a=jonas-schievink
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
-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(), |