mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
improved symbol debugging output from the surgical linker
This commit is contained in:
parent
30dbad88ae
commit
d70625b21b
1 changed files with 21 additions and 2 deletions
|
@ -291,9 +291,28 @@ pub(crate) fn preprocess_elf(
|
|||
|
||||
if verbose {
|
||||
println!(
|
||||
"Found roc symbol definitions: {:+x?}",
|
||||
md.roc_symbol_vaddresses
|
||||
"Found {} roc symbol definitions:",
|
||||
md.roc_symbol_vaddresses.len()
|
||||
);
|
||||
|
||||
let (mut builtins, mut other): (Vec<_>, Vec<_>) = md
|
||||
.roc_symbol_vaddresses
|
||||
.iter()
|
||||
.partition(|(n, _)| n.starts_with("roc_builtins"));
|
||||
|
||||
// sort by address
|
||||
builtins.sort_by_key(|t| t.1);
|
||||
other.sort_by_key(|t| t.1);
|
||||
|
||||
for (name, vaddr) in other.iter() {
|
||||
println!("\t{:#08x}: {}", vaddr, name);
|
||||
}
|
||||
|
||||
println!("Of which {} are builtins", builtins.len(),);
|
||||
|
||||
for (name, vaddr) in builtins.iter() {
|
||||
println!("\t{:#08x}: {}", vaddr, name);
|
||||
}
|
||||
}
|
||||
|
||||
let exec_parsing_duration = exec_parsing_start.elapsed();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue