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)