Mark .debug_str as mergeable strings

Fixes rust-lang/rustc_codegen_cranelift#1496
This commit is contained in:
bjorn3 2024-06-30 11:54:45 +00:00
parent 28950f36cc
commit 7a1601553d

View File

@ -39,7 +39,13 @@ fn add_debug_section(
let section_id = self.object.add_section(
segment,
name,
if id == SectionId::EhFrame { SectionKind::ReadOnlyData } else { SectionKind::Debug },
if id == SectionId::DebugStr {
SectionKind::DebugString
} else if id == SectionId::EhFrame {
SectionKind::ReadOnlyData
} else {
SectionKind::Debug
},
);
self.object
.section_mut(section_id)