On FreeBSD, linking the zfs kernel module with binutils ld 2.44 shows
the following warning:
ld: warning: aesni-gcm-avx2-vaes.o: missing .note.GNU-stack section implies executable stack ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
Some of the .S files under module/icp/asm-x86_64/modes check whether
to emit the .note.GNU-stack section using:
#if defined(__linux__) && defined(__ELF__)
We could add && defined(__FreeBSD__) to the test, but since all other
.S files in the OpenZFS tree use:
#ifdef __ELF__
it would seem more logical to use that instead. Any recent ELF platform
should support these note sections by now.
MFC after: 3 days