Why ELFOSABI_HPUX instead of ELFOSABI_NONE for hppa-*-elf

Nick Clifton nickc@redhat.com
Mon May 24 15:16:00 GMT 2004
Hi Mark,

> Does anybody know why the EI_OSABI field in the ELF header is set to
> ELFOSABI_HPUX instead of ELFOSABI_NONE for PA-RISC ELF32 files?  This
> seems rather odd for a generic ELF target like hppa-*elf, and perhaps
> even wierder for hppa-*-openbsd*.

I cannot say for sure, but my guess would be that the PA-RISC support 
was first developed for an HPUX target machine and so the field was set 
to ELFOSABI_HPUX.  When other targets came along, including the generic 
ELF target, they probably did not case what value was put in this field 
so nobody complained or changed the code.

Looking at the sources today there is obviously special case handling 
for the elf32-hppa-linux target which uses ELFOSABI_LINUX, so there is 
no reason why this code could not be extended for other targets.

Cheers
   Nick





More information about the Binutils mailing list