[parisc-linux] Elf Header change proposal

Paul Bame bame@noam.fc.hp.com
Tue, 31 Oct 2000 09:51:31 -0700


= 
=     2) 64 bit parisc binaries (currently just vmlinux) are currently using
=     the Elf32_hdr type.  They should be changed to use the Elf64_hdr type.

This I don't understand.  Palo (and palo's boot loader, and hpux's
boot loader) successfully use
eh.e_ident[EI_CLASS] == ELFCLASS32 and eh.e_ident[EI_CLASS] == ELFCLASS64
along with (__be16_to_cpu(eh.e_machine) == EM_PARISC)
to distinguish 32/64-bit parisc executables.  In the 64-bit case, palo
happily uses struct elf64_phdr to grok the 64-bit vmlinux header.
palo/lib/elf*.c has the details if they're of interest.

Palo has some potential problems: it doesn't check ABI, assumes
big endian byte order, and assumes that 64-bit ELF headers imply
a wide kernel (calling PDC and setting the W bit appropriately).

	-P