--- a/vendor/object-0.36.7/src/read/macho/relocation.rs +++ b/vendor/object-0.36.7/src/read/macho/relocation.rs @@ -64,6 +64,14 @@ _ => unknown, } } + macho::CPU_TYPE_POWERPC => match (reloc.r_type, reloc.r_pcrel) { + (macho::PPC_RELOC_VANILLA, false) => (K::Absolute, g), + _ => unknown, + }, + macho::CPU_TYPE_POWERPC64 => match (reloc.r_type, reloc.r_pcrel) { + (macho::PPC_RELOC_VANILLA, false) => (K::Absolute, g), + _ => unknown, + }, macho::CPU_TYPE_X86 => match (reloc.r_type, reloc.r_pcrel) { (macho::GENERIC_RELOC_VANILLA, false) => (K::Absolute, g), _ => unknown, --- a/vendor/object-0.36.7/src/write/macho.rs +++ b/vendor/object-0.36.7/src/write/macho.rs @@ -346,6 +346,14 @@ (K::Relative, E::AArch64Call) => (true, macho::ARM64_RELOC_BRANCH26), _ => return unsupported_reloc(), }, + Architecture::PowerPc => match kind { + K::Absolute => (false, macho::PPC_RELOC_VANILLA), + _ => return unsupported_reloc(), + }, + Architecture::PowerPc64 => match kind { + K::Absolute => (false, macho::PPC_RELOC_VANILLA), + _ => return unsupported_reloc(), + }, _ => { return Err(Error(format!( "unimplemented architecture {:?}", --- a/vendor/object-0.37.1/src/read/macho/relocation.rs +++ b/vendor/object-0.37.1/src/read/macho/relocation.rs @@ -64,6 +64,14 @@ _ => unknown, } } + macho::CPU_TYPE_POWERPC => match (reloc.r_type, reloc.r_pcrel) { + (macho::PPC_RELOC_VANILLA, false) => (K::Absolute, g), + _ => unknown, + }, + macho::CPU_TYPE_POWERPC64 => match (reloc.r_type, reloc.r_pcrel) { + (macho::PPC_RELOC_VANILLA, false) => (K::Absolute, g), + _ => unknown, + }, macho::CPU_TYPE_X86 => match (reloc.r_type, reloc.r_pcrel) { (macho::GENERIC_RELOC_VANILLA, false) => (K::Absolute, g), _ => unknown, --- a/vendor/object-0.37.1/src/write/macho.rs +++ b/vendor/object-0.37.1/src/write/macho.rs @@ -236,6 +236,14 @@ (K::Relative, E::AArch64Call) => (true, macho::ARM64_RELOC_BRANCH26), _ => return unsupported_reloc(), }, + Architecture::PowerPc => match kind { + K::Absolute => (false, macho::PPC_RELOC_VANILLA), + _ => return unsupported_reloc(), + }, + Architecture::PowerPc64 => match kind { + K::Absolute => (false, macho::PPC_RELOC_VANILLA), + _ => return unsupported_reloc(), + }, _ => { return Err(Error(format!( "unimplemented architecture {:?}",