RTS linker: Improve compatibility with NetBSD
- Hint address to NetBSD
mmap(2)
has a different semantics from that of Linux. When a hint address is provided,mmap(2)
searches for a free region at or below the hint but never above it. This means we can't reliably search for free regions incrementally on the userland, especially when ASLR is enabled. Let the kernel do it for us if we don't care where the mapped address is going to be. - NetBSD not only hates to map pages as
rwx
but also disallows to switch pages fromrw-
tor-x
unless the intention is declared when pages are initially requested. This means we need a newMemoryAccess
mode for pages that are going to be changed tor-x
.
-
are either individually buildable or squashed -
have commit messages which describe what they do (referring to [Notes][notes] and tickets using #NNNN
syntax when appropriate) -
have added source comments describing your change. For larger changes you likely should add a [Note][notes] and cross-reference it from the relevant places. -
add a testcase to the testsuite. -
replace this message with a description motivating your change