diff --git a/src/cmd/elf2dol.rs b/src/cmd/elf2dol.rs index 7604ab13..dbbe5dc5 100644 --- a/src/cmd/elf2dol.rs +++ b/src/cmd/elf2dol.rs @@ -196,7 +196,7 @@ fn section_kind(section: &object::Section) -> SectionKind { .and_then(|name| match name { ".init" | ".text" | ".vmtext" | ".dbgtext" => Some(SectionKind::Text), ".ctors" | ".dtors" | ".data" | ".rodata" | ".sdata" | ".sdata2" | "extab" - | "extabindex" | ".BINARY" => Some(SectionKind::Data), + | "extabindex" | ".BINARY" | "wii_embedded" => Some(SectionKind::Data), ".bss" | ".sbss" | ".sbss2" => Some(SectionKind::UninitializedData), _ => None, }) diff --git a/src/obj/sections.rs b/src/obj/sections.rs index 75a7da99..ba96aa55 100644 --- a/src/obj/sections.rs +++ b/src/obj/sections.rs @@ -241,7 +241,7 @@ pub fn section_kind_for_section(section_name: &str) -> Result { ObjSectionKind::ReadOnlyData } ".bss" | ".sbss" | ".sbss2" => ObjSectionKind::Bss, - ".data" | ".sdata" => ObjSectionKind::Data, + ".data" | ".sdata" | "wii_embedded" => ObjSectionKind::Data, name => bail!("Unknown section {name}"), }) } diff --git a/src/util/asm.rs b/src/util/asm.rs index 919dafb6..a4241024 100644 --- a/src/util/asm.rs +++ b/src/util/asm.rs @@ -958,7 +958,7 @@ where write!(w, ".section {}", section.name)?; write!(w, ", \"ax\"")?; } - ".data" | ".sdata" => { + ".data" | ".sdata" | "wii_embedded" => { write!(w, ".section {}", section.name)?; write!(w, ", \"wa\"")?; } diff --git a/src/util/config.rs b/src/util/config.rs index d34cfb9f..417f600a 100644 --- a/src/util/config.rs +++ b/src/util/config.rs @@ -70,7 +70,7 @@ pub fn apply_symbols_file( pub fn parse_symbol_line(line: &str, obj: &mut ObjInfo) -> Result> { static SYMBOL_LINE: Lazy = Lazy::new(|| { Regex::new( - "^\\s*(?P[^\\s=]+)\\s*=\\s*(?:(?P
[A-Za-z0-9.]+):)?(?P[0-9A-Fa-fXx]+);(?:\\s*//\\s*(?P.*))?$", + "^\\s*(?P[^\\s=]+)\\s*=\\s*(?:(?P
[A-Za-z0-9._]+):)?(?P[0-9A-Fa-fXx]+);(?:\\s*//\\s*(?P.*))?$", ) .unwrap() });