This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Error in elf_from_remote_memory?


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
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
 
 
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]