]> git.kaiwu.me - haproxy.git/commit
BUILD: sym: Get it to build and work on various OSes
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 14 Oct 2026 13:23:14 +0000 (15:23 +0200)
committerOlivier Houchard <cognet@ci0.org>
Thu, 15 Oct 2026 15:31:28 +0000 (17:31 +0200)
commit4447f4a0bd4fcc522d1edfd5e569d25a049e35ac
treed878006c7658a175d34f4141b697d84473ca88d9
parente910097cdf8c8bdb42d26af129dcf6ced7db6ba9
BUILD: sym: Get it to build and work on various OSes

Define NT_GNU_BUILD_ID and STT_GNU_IFUNC, as those are GNU extensions,
and not every OS defines it.
Define ElfW() if it is not provided by the OS already.
Make sure sections are actually readable, as sometimes they are not on
OpenBSD.
The NetBSD linker does not use an empty name for the executable, so
don't recognize it that way. However, every OS will provide the
executable first, so rely on that instead.

With those changes, this builds and works on NetBSD, OpenBSD and
Solaris/Illumos.
src/sym.c