Skip to content

Commit

Permalink
X: Try to change code size.
Browse files Browse the repository at this point in the history
  • Loading branch information
detly committed Jul 18, 2023
1 parent 62c9cb0 commit 82f3d18
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions src/symbolize/gimli/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,31 +45,7 @@ impl Mapping {

/// Load debuginfo from an external debug file.
fn new_debug(original_path: &Path, path: PathBuf, crc: Option<u32>) -> Option<Mapping> {
let map = super::mmap(&path)?;
Mapping::mk(map, |map, stash| {
let object = Object::parse(&map)?;

if let Some(_crc) = crc {
// TODO: check crc
}

// Try to locate a supplementary object file.
let mut sup = None;
if let Some((path_sup, build_id_sup)) = object.gnu_debugaltlink_path(&path) {
if let Some(map_sup) = super::mmap(&path_sup) {
let map_sup = stash.cache_mmap(map_sup);
if let Some(sup_) = Object::parse(map_sup) {
if sup_.build_id() == Some(build_id_sup) {
sup = Some(sup_);
}
}
}
}

let dwp = Mapping::load_dwarf_package(original_path, stash);

Context::new(stash, object, sup, dwp)
})
None
}

/// Try to locate a DWARF package file.
Expand Down

0 comments on commit 82f3d18

Please sign in to comment.