Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion libwild/src/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1889,7 +1889,9 @@ impl platform::Platform for Elf {
}
_ => {}
}

if section_name.strip_prefix(b".debug_").is_some() {
return SectionRuleOutcome::Debug;
}
SectionRuleOutcome::Custom
}

Expand Down
6 changes: 6 additions & 0 deletions libwild/src/elf_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1526,6 +1526,7 @@ fn build_sym_index_map(layout: &ElfLayout<'_>) -> Vec<Option<u32>> {
SectionSlot::Loaded(sec) => Some(sec.output_section_id()),
SectionSlot::MergeStrings(sec) => Some(sec.part_id.output_section_id()),
SectionSlot::FrameData(..) => Some(crate::output_section_id::EH_FRAME),
SectionSlot::LoadedDebugInfo(sec) => Some(sec.output_section_id()),
_ => None,
}
{
Expand Down Expand Up @@ -1958,6 +1959,7 @@ fn write_symbols<'data>(
SectionSlot::Loaded(section) => section.output_section_id(),
SectionSlot::MergeStrings(section) => section.part_id.output_section_id(),
SectionSlot::FrameData(..) => output_section_id::EH_FRAME,
SectionSlot::LoadedDebugInfo(section) => section.output_section_id(),
_ => bail!(
"Tried to copy a symbol in a section we didn't load. {}",
layout.symbol_debug(symbol_id)
Expand Down Expand Up @@ -4027,6 +4029,10 @@ fn get_symbol_attributes(layout: &ElfLayout, symbol_id: SymbolId) -> Result<(u32
SectionSlot::MergeStrings(section) => {
Some(section.part_id.output_section_id())
}
SectionSlot::LoadedDebugInfo(section) => {
Some(section.output_section_id())
}

_ => None,
})
.and_then(|output_section_id| {
Expand Down
1 change: 0 additions & 1 deletion wild/tests/external_tests/mold_skip_tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ tests = [
"oformat-binary.sh",
"omagic.sh",
"package-metadata.sh",
"relocatable-debug-info.sh",
"relocatable-exception.sh",
"relocatable-merge-sections.sh",
"repro.sh", # Note in this test's second half that it uses a custom environment variable called `MOLD_REPRO`. While Wild currently doesn't support `--repro`, it will eventually be moved to the "ignore" group once support is added.
Expand Down
Loading