Update immediate and transitive dependencies
I don't think this has happened in awhile but I've run a `cargo update` as well as trimming some of the duplicate/older dependencies in `Cargo.lock` by updating some of our immediate dependencies as well.
This commit is contained in:
@@ -78,7 +78,7 @@ pub fn build_dependencies<R: Reader<Offset = usize>>(
|
||||
}
|
||||
|
||||
fn build_unit_dependencies<R: Reader<Offset = usize>>(
|
||||
header: read::CompilationUnitHeader<R>,
|
||||
header: read::UnitHeader<R>,
|
||||
dwarf: &read::Dwarf<R>,
|
||||
at: &AddressTransform,
|
||||
deps: &mut Dependencies,
|
||||
|
||||
@@ -37,16 +37,16 @@ fn relocate_dwarf_sections(
|
||||
defined_funcs_offset: usize,
|
||||
funcs: &[*const u8],
|
||||
) -> Result<(), Error> {
|
||||
use object::read::{File, Object, ObjectSection, RelocationTarget};
|
||||
use object::read::{File, Object, ObjectSection, ObjectSymbol, RelocationTarget};
|
||||
|
||||
let obj = File::parse(bytes)?;
|
||||
let mut func_symbols = HashMap::new();
|
||||
for (id, sym) in obj.symbols() {
|
||||
for sym in obj.symbols() {
|
||||
match (sym.name(), sym.section_index()) {
|
||||
(Some(name), Some(_section_index)) if name.starts_with("_wasm_function_") => {
|
||||
(Ok(name), Some(_section_index)) if name.starts_with("_wasm_function_") => {
|
||||
let index = name["_wasm_function_".len()..].parse::<usize>()?;
|
||||
let data = funcs[index - defined_funcs_offset];
|
||||
func_symbols.insert(id, data);
|
||||
func_symbols.insert(sym.index(), data);
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! Helper utils for tracking and patching intra unit or section references.
|
||||
|
||||
use gimli::write;
|
||||
use gimli::{CompilationUnitHeader, DebugInfoOffset, Reader, UnitOffset};
|
||||
use gimli::{DebugInfoOffset, Reader, UnitHeader, UnitOffset};
|
||||
use std::collections::HashMap;
|
||||
|
||||
/// Stores compiled unit references: UnitEntryId+DwAt denotes a patch location
|
||||
@@ -76,17 +76,15 @@ impl DebugInfoRefsMap {
|
||||
map: HashMap::new(),
|
||||
}
|
||||
}
|
||||
pub fn insert<R>(
|
||||
&mut self,
|
||||
unit: &CompilationUnitHeader<R>,
|
||||
unit_id: write::UnitId,
|
||||
unit_map: UnitRefsMap,
|
||||
) where
|
||||
pub fn insert<R>(&mut self, unit: &UnitHeader<R>, unit_id: write::UnitId, unit_map: UnitRefsMap)
|
||||
where
|
||||
R: Reader<Offset = usize>,
|
||||
{
|
||||
self.map
|
||||
.extend(unit_map.map.into_iter().map(|(off, entry_id)| {
|
||||
let off = off.to_debug_info_offset(unit);
|
||||
let off = off
|
||||
.to_debug_info_offset(unit)
|
||||
.expect("should be in debug_info section");
|
||||
(off, (unit_id, entry_id))
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user