HomeFreeBSD

Use -znorelro for kernel modules, when they are linked as shared

Description

Use -znorelro for kernel modules, when they are linked as shared
binaries (e.g. on any arch except amd64 and mips).

Otherwise, with lld 9, after https://reviews.llvm.org/rLLD356117, the
modules will get an additional PT_LOAD segment, which blows up kldxref,
since that has a hardcoded limit of 3 segments.

I could have alternatively bumped up that limit, but since kernel
modules do not use relro, the simplest workaround is to explicitly
disable it.

Details

Provenance
dimAuthored on
Parents
rS352097: msdosfsmount.h: fix ifdef comment
Branches
Unknown
Tags
Unknown