Browse Source

add clean-room elf.h to avoid GPL entanglement

eos20
Andrew Waterman 13 years ago
parent
commit
5ba0377b29
  1. 8
      pk/elf.c
  2. 2791
      pk/elf.h

8
pk/elf.c

@ -43,15 +43,17 @@ long load_elf(const char* fn, int* user64)
} while(0)
long entry;
if(eh64->e_ident[EI_CLASS] == ELFCLASS32)
*user64 = 0;
if (IS_ELF32(*eh64))
{
Elf32_Ehdr* eh;
Elf32_Phdr* ph;
LOAD_ELF;
entry = eh->e_entry;
}
else if(eh64->e_ident[EI_CLASS] == ELFCLASS64)
else if (IS_ELF64(*eh64))
{
*user64 = 1;
Elf64_Ehdr* eh;
Elf64_Phdr* ph;
LOAD_ELF;
@ -60,8 +62,6 @@ long load_elf(const char* fn, int* user64)
else
goto fail;
*user64 = eh64->e_ident[EI_CLASS] == ELFCLASS64;
file_decref(file);
return entry;

2791
pk/elf.h

File diff suppressed because it is too large
Loading…
Cancel
Save