rts/linker: Fix out-of-bounds mapping logic
Previously the structure of mmapInRegion
concealed a subtle bug
concerning handling of mmap
returning mappings below the beginning of
the desired region. Specifically, we would reset p = result + bytes
and then again reset p = region->start
before looping around for
another iteration. This resulted in an infinite loop on FreeBSD.
Fixes #25492 (closed).