[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

re: thoughts on architectures

   There's a field in the ELF header called OS/ABI. Readelf -h finds it, and it
   looks like this:
   Normal binaries:
     OS/ABI:                            UNIX - System V
   FreeBSD binaries:
     OS/ABI:                            UNIX - FreeBSD
   I need to look into it a bit more, and figure out exactly what FreeBSD does
   and doesn't do with this.

basically, when you set OSABI, you are declaring "this is not
standard ELF."  tools can no longer assume anything about how
it works.  actually, given that freebsd's ELF *is* not the
SYSV ABI, this is probably the right thing for them to do..
(they have a different (slower -- see -fpcc-struct-return)
structure return convention than SYSV.)

but all the rest of the world besides HPUX use ELF as it is
and shouldn't set ELF_OSABI.  this field has a bad name, but
there you have it :-)

Reply to: