I was trying to debug a PPC64 crash from a X86_64 machine. I got crash (7.2.8) to work with a "make target=PPC64", but when I tried to load an extension I got this error:
I tried other sample extensions (like dminfo) with the same result.
A little debugging shows that "is_shared_object()" is returning FALSE leading to this. Just commenting the call makes the extension work as expected.
3852 } else if ((elf64->e_ident[EI_CLASS] == ELFCLASS64) &&
(gdb)
3854 switch (swap16(elf64->e_machine, swap))
(gdb) p elf64
$6 = (Elf64_Ehdr *) 0x7fffffffca40
(gdb) p *elf64
$7 = {e_ident = "\177ELF\002\001\001\000\000\000\000\000\000\000\000", e_type = 3, e_machine = 62,
e_version = 1, e_entry = 511360, e_phoff = 64, e_shoff = 20379704, e_flags = 0, e_ehsize = 64,
e_phentsize = 56, e_phnum = 7, e_shentsize = 64, e_shnum = 31, e_shstrndx = 28}
(gdb) p/x *elf64
$8 = {e_ident = {0x7f, 0x45, 0x4c, 0x46, 0x2, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
e_type = 0x3, e_machine = 0x3e, e_version = 0x1, e_entry = 0x7cd80, e_phoff = 0x40, e_shoff = 0x136f838,
e_flags = 0x0, e_ehsize = 0x40, e_phentsize = 0x38, e_phnum = 0x7, e_shentsize = 0x40, e_shnum = 0x1f,
e_shstrndx = 0x1c}
(gdb) n
3867 if (machine_type("X86_64") || machine_type("ARM64"))
(gdb)
3877 if (machine_type("ARM64"))
(gdb)
3887 if (CRASHDEBUG(1))
(gdb) p swap
$9 = 0
(gdb) p machine_type("X86_64")
$10 = 0
(gdb) p machine_type("PPC64")
$11 = 1
(gdb) n
3793 return FALSE;