This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

EI_ABIVERSION usage


In FreeBSD'ville we are considering changing our syscall ABI.
The gABI has:

    EI_ABIVERSION 
      Byte e_ident[EI_ABIVERSION] identifies the the version of the ABI
      to which the object is targeted. This field is used to distinguish
      among incompatible versions of an ABI. The interpretation of this
      version number is dependent on the ABI identified by the EI_OSABI
      field. Applications conforming to this specification use the value
      0.

Which seems to be just what we are looking for -- a very simple way to
determine which FreeBSD ABI a binary is.  From my reading of the above it
seems an OS is free to use the EI_ABIVERSION version.  But then why are
conforming applications required to use a 0 value?

Yes I know, someone will say to bump a value in a .note.ABI-tag section.
But if .note.ABI-tag is the end all and be all, then why did the ELF spec
authors even create EI_OSABI and EI_ABIVERSION??  And why did they put
things in the ELF header such that things are very easy to parse just by
reading a small amount of a binary?  A LOT of the things in an ELF header
could have been put in .note sections.  But they weren't because it is so
much easier to read fixed structures.

-- 
-- David  (obrien@FreeBSD.org)


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