diff --git a/objdiff-core/config-schema.json b/objdiff-core/config-schema.json index 2a307ab..9dd46d3 100644 --- a/objdiff-core/config-schema.json +++ b/objdiff-core/config-schema.json @@ -158,6 +158,10 @@ "value": "o32", "name": "O32" }, + { + "value": "o64", + "name": "O64" + }, { "value": "n32", "name": "N32" @@ -165,6 +169,14 @@ { "value": "n64", "name": "N64" + }, + { + "value": "eabi32", + "name": "eabi32" + }, + { + "value": "eabi64", + "name": "eabi64" } ] }, diff --git a/objdiff-core/src/arch/mips.rs b/objdiff-core/src/arch/mips.rs index 51a34b0..134e2f1 100644 --- a/objdiff-core/src/arch/mips.rs +++ b/objdiff-core/src/arch/mips.rs @@ -46,8 +46,11 @@ impl ArchMips { object::FileFlags::None => {} object::FileFlags::Elf { e_flags, .. } => { abi = match e_flags & EF_MIPS_ABI { - elf::EF_MIPS_ABI_O32 | elf::EF_MIPS_ABI_O64 => Abi::O32, - elf::EF_MIPS_ABI_EABI32 | elf::EF_MIPS_ABI_EABI64 => Abi::N32, + elf::EF_MIPS_ABI_O32 => Abi::O32, + elf::EF_MIPS_ABI_O64 if e_flags & elf::EF_MIPS_ABI2 != 0 => Abi::N64, + elf::EF_MIPS_ABI_O64 => Abi::O64, + elf::EF_MIPS_ABI_EABI32 => Abi::EABI32, + elf::EF_MIPS_ABI_EABI64 => Abi::EABI64, _ => { if e_flags & elf::EF_MIPS_ABI2 != 0 { Abi::N32 @@ -170,8 +173,11 @@ impl ArchMips { .with_abi(match diff_config.mips_abi { MipsAbi::Auto => self.abi, MipsAbi::O32 => Abi::O32, + MipsAbi::O64 => Abi::O64, MipsAbi::N32 => Abi::N32, MipsAbi::N64 => Abi::N64, + MipsAbi::Eabi32 => Abi::EABI32, + MipsAbi::Eabi64 => Abi::EABI64, }) } diff --git a/objdiff-core/tests/snapshots/arch_mips__read_mips.snap b/objdiff-core/tests/snapshots/arch_mips__read_mips.snap index dd4de0d..f6fdc19 100644 --- a/objdiff-core/tests/snapshots/arch_mips__read_mips.snap +++ b/objdiff-core/tests/snapshots/arch_mips__read_mips.snap @@ -1,12 +1,12 @@ --- source: objdiff-core/tests/arch_mips.rs -assertion_line: 10 +assertion_line: 12 expression: obj --- Object { arch: ArchMips { endianness: Little, - abi: N32, + abi: EABI64, isa_extension: Some( R5900EE, ),