Hi,
 
In function 'elf_from_remote_memory' (file elf_from_memory.c) I see references to 32-bit variant when file format is 64-bit one in couple of places:
line 246:
    case ELFCLASS64:
      if (elf32_xlatetom (&xlateto, &xlatefrom,
     ehdr.e32.e_ident[EI_DATA]) == NULL)
 goto libelf_error;
      for (uint_fast16_t i = 0; i < phnum; ++i)
 if (phdrs.p32[i].p_type == PT_LOAD) //<===== should it be phdrs.p64[i] ?
and line 323:
    case ELFCLASS64:
      for (uint_fast16_t i = 0; i < phnum; ++i)
 if (phdrs.p32[i].p_type == PT_LOAD) //<===== should it be phdrs.p64[i] ?
 
Is it intentionally?
 
Thanks,
--Serge