From 7a1601553dde7d74f7aefc509486d4ae564de662 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sun, 30 Jun 2024 11:54:45 +0000 Subject: [PATCH] Mark .debug_str as mergeable strings Fixes rust-lang/rustc_codegen_cranelift#1496 --- src/debuginfo/object.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/debuginfo/object.rs b/src/debuginfo/object.rs index 65f4c67b21f..7c873515a8f 100644 --- a/src/debuginfo/object.rs +++ b/src/debuginfo/object.rs @@ -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)