MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / build_module_section_map

Function build_module_section_map

crates/asm-to-binary/src/object_linker.rs:357–370  ·  view source on GitHub ↗

Pre-compute a section map for a module: [(name, `start_addr`, `end_addr`)] in the same order as `ordered_sections`.

(module: &AssembledOutput)

Source from the content-addressed store, hash-verified

355 if sec.kind.as_ref() == Some(kind) && seen.insert(kind.clone()) {
356 out.push(kind.clone());
357 }
358 }
359 }
360 }
361
362 // Custom sections in their first-appearance order
363 for (_name, module) in modules {
364 for sec in &module.sections {
365 if let Some(kind) = &sec.kind
366 && !preferred.contains(kind)
367 && !matches!(kind, SectionKind::Bss)
368 && seen.insert(kind.clone())
369 {
370 out.push(kind.clone());
371 }
372 }
373 }

Callers 1

linkMethod · 0.85

Calls 3

ordered_sectionsFunction · 0.85
pushMethod · 0.80
nameMethod · 0.45

Tested by

no test coverage detected