On Thu, Apr 01, 2021 at 03:29:54PM +0100, George Brown wrote: > In revision 1.35 EI_BRAND was removed in conjunction with EI_OSABI and > EI_ABIVERSION being added, but it looks like this has not been reflected > in elf(5). The only place EI_BRAND appears in OpenBSD's current source > tree is this man page, as such I think it's worth removing. > > For a quick comparison to other systems FreeBSD still mentions EI_BRAND > but NetBSD does not (and never appeared to document this in any man > page). With regards to EI_OSABI and EI_ABIVERSION FreeBSD covers the > defined values whereas NetBSD does not as they note only ELFOSABI_SYSV > is used. On the other hand FreeBSD does indeed mark native binaries as > ELFOSABI_FREEBSD. Further afield in Linux EI_BRAND was removed, EI_OSABI > and EI_ABIVERSION defined values are covered similar to FreeBSD. > > The diff below removes mention of EI_BRAND and uncomments the EI_OSABI > and EI_ABIVERSION parts which appear to have been present since the > initial appearance of this man page. In addition I've added the mention > of the Modesto and OpenBSD EI_OSABI values as they are defined in > sys/sys/exec_elf.h. >
a different diff has been committed by kettenis. thanks for your mail, jmc > diff --git a/share/man/man5/elf.5 b/share/man/man5/elf.5 > index 57b0bf0da4d..6ce92ef9bb4 100644 > --- a/share/man/man5/elf.5 > +++ b/share/man/man5/elf.5 > @@ -207,51 +207,56 @@ Invalid version. > .It Dv EV_CURRENT > Current version. > .El > -.\" .It Dv EI_OSABI > -.\" This byte identifies the operating system > -.\" and ABI to which the object is targeted. > -.\" Some fields in other ELF structures have flags > -.\" and values that have platform specific meanings; > -.\" the interpretation of those fields is determined by the value of this > byte. > -.\" The following values are currently defined: > -.\" .Pp > -.\" .Bl -tag -width "ELFOSABI_STANDALONE" -compact > -.\" .It Dv ELFOSABI_SYSV > -.\" UNIX System V ABI. > -.\" .It Dv ELFOSABI_HPUX > -.\" HP-UX operating system ABI. > -.\" .It Dv ELFOSABI_NETBSD > -.\" .Nx > -.\" operating system ABI. > -.\" .It Dv ELFOSABI_LINUX > -.\" GNU/Linux operating system ABI. > -.\" .It Dv ELFOSABI_HURD > -.\" GNU/Hurd operating system ABI. > -.\" .It Dv ELFOSABI_86OPEN > -.\" 86Open Common IA32 ABI. > -.\" .It Dv ELFOSABI_SOLARIS > -.\" Solaris operating system ABI. > -.\" .It Dv ELFOSABI_MONTEREY > -.\" Monterey project ABI. > -.\" .It Dv ELFOSABI_IRIX > -.\" IRIX operating system ABI. > -.\" .It Dv ELFOSABI_FREEBSD > -.\" .Fx > -.\" operating system ABI. > -.\" .It Dv ELFOSABI_TRU64 > -.\" TRU64 UNIX operating system ABI. > -.\" .It Dv ELFOSABI_ARM > -.\" ARM architecture ABI. > -.\" .It Dv ELFOSABI_STANDALONE > -.\" Stand-alone (embedded) ABI. > -.\" .El > -.\" .It Dv EI_ABIVERSION > -.\" This byte identifies 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. > +.It Dv EI_OSABI > +This byte identifies the operating system > +and ABI to which the object is targeted. > +Some fields in other ELF structures have flags > +and values that have platform specific meanings; > +the interpretation of those fields is determined by the value of this byte. > +The following values are currently defined: > +.Pp > +.Bl -tag -width "ELFOSABI_STANDALONE" -compact > +.It Dv ELFOSABI_SYSV > +UNIX System V ABI. > +.It Dv ELFOSABI_HPUX > +HP-UX operating system ABI. > +.It Dv ELFOSABI_NETBSD > +.Nx > +operating system ABI. > +.It Dv ELFOSABI_LINUX > +GNU/Linux operating system ABI. > +.It Dv ELFOSABI_HURD > +GNU/Hurd operating system ABI. > +.It Dv ELFOSABI_86OPEN > +86Open Common IA32 ABI. > +.It Dv ELFOSABI_SOLARIS > +Solaris operating system ABI. > +.It Dv ELFOSABI_MONTEREY > +Monterey project ABI. > +.It Dv ELFOSABI_IRIX > +IRIX operating system ABI. > +.It Dv ELFOSABI_FREEBSD > +.Fx > +operating system ABI. > +.It Dv ELFOSABI_TRU64 > +TRU64 UNIX operating system ABI. > +.It Dv ELFOSABI_MODESTO > +Modesto operating system ABI. > +.It Dv ELFOSABI_OPENBSD > +.Ox > +operating system ABI. > +.It Dv ELFOSABI_ARM > +ARM architecture ABI. > +.It Dv ELFOSABI_STANDALONE > +Stand-alone (embedded) ABI. > +.El > +.It Dv EI_ABIVERSION > +This byte identifies 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. > .It Dv EI_PAD > Start of padding. > These bytes are reserved and set to zero. > @@ -259,8 +264,6 @@ Programs > which read them should ignore them. > The value for EI_PAD will change in > the future if currently unused bytes are given meanings. > -.It Dv EI_BRAND > -Start of architecture identification. > .It Dv EI_NIDENT > The size of the e_ident array. > .El >