Other operating systems have a typedef called Elf_Nhdr. Why is it absent on FreeBSD? Can we add it? From Mesa: https://lists.freedesktop.org/archives/mesa-dev/2018-January/182471.html
No objection to the change; trying to find some published standard to justify the name. If that ends up being "well, Linux does it," that's fine, too. But I'll spend a little time looking. So far: The note structure is described anonymously in the original Sun ELF document, as well as in SysV ABI 4.1.
(In fact, I'm having trouble figuring out where this is defined on Linux. elfutils-libelf defines a Gelf_Nhdr. Is that it? If so, it's so old elfutils' git history isn't helping me find a source.)
Apparently OpenBSD took that from NetBSD in 2001: https://github.com/openbsd/src/commit/6917584ad119d2e4f5e1a1bed33d2ecab5dbc26a And NetBSD in 1999 did this to match "various SVR4 ABIs" https://github.com/IIJ-NetBSD/netbsd-src/commit/27bb633dcae90dbb476a3e4d9bc5895d68b20393
(In reply to Greg V from comment #3) Thanks for digging that up!
A commit references this bug: Author: cem Date: Thu Jan 18 21:19:57 UTC 2018 New revision: 328137 URL: https://svnweb.freebsd.org/changeset/base/328137 Log: Add Elf_Nhdr definition to match NetBSD, OpenBSD, Linux The mesa port started to use this type and fails to build without it. NetBSD: http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/exec_elf.h.diff?r1=1.26&r2=1.27&f=h OpenBSD: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/sys/exec_elf.h.diff?r1=1.21&r2=1.22&f=h PR: 225302 Reported by: Greg V <greg AT unrelenting.technology> Sponsored by: Dell EMC Isilon Changes: head/sys/sys/elf_common.h