Discussion:
Usage of .note.openbsd.ident
George Brown
2021-05-21 14:25:45 UTC
Permalink
It seems this ELF note was used for the now dead compat_linux feature.
Aside from compat systems in other operating systems that may wish to
identify OpenBSD binaries does this note have any other active uses?
Philip Guenther
2021-05-27 03:21:15 UTC
Permalink
Post by George Brown
It seems this ELF note was used for the now dead compat_linux feature.
Aside from compat systems in other operating systems that may wish to
identify OpenBSD binaries does this note have any other active uses?
The point of the note (and/or the OS/ABI field in the ELF header) is to
permit portable ELF tools to identify how to interpret OS-specific values,
those in the OS-ranges for types, for example. Not inserting _some_
identifying factor is basically doing an embrace-and-extend on ELF and
actively hostile to portability of tooling.

If you find that ELF note obnoxious, just fix the linkers to instead set
the ELF ABI field correctly. As I understand it, the 'go' tool chain has
done that for years. It's really the better choice for this, would take
less space and be faster to process.


Philip Guenther
George Brown
2021-05-27 09:56:04 UTC
Permalink
Thank you for the reply, I was just curious.
Post by George Brown
It seems this ELF note was used for the now dead compat_linux feature.
Aside from compat systems in other operating systems that may wish to
identify OpenBSD binaries does this note have any other active uses?
The point of the note (and/or the OS/ABI field in the ELF header) is to permit portable ELF tools to identify how to interpret OS-specific values, those in the OS-ranges for types, for example. Not inserting _some_ identifying factor is basically doing an embrace-and-extend on ELF and actively hostile to portability of tooling.
If you find that ELF note obnoxious, just fix the linkers to instead set the ELF ABI field correctly. As I understand it, the 'go' tool chain has done that for years. It's really the better choice for this, would take less space and be faster to process.
Philip Guenther
Loading...