On Sat, 15 Nov 2025, Ramiro Aceves wrote:
packardbell_netbsd$ uname -a
NetBSD packardbell_netbsd 11.0_BETA NetBSD 11.0_BETA (GENERIC) #0: Tue Oct 28
15:00:36 UTC 2025
[email protected]:/usr/src/sys/arch/i386/compile/GENERIC i386
[...]
packardbell_netbsd$ dosbox
/usr/pkg/bin/dosbox: text relocations
[1] Segmentation fault (core dumped) dosbox
packardbell_netbsd$
This looks like a runtime linker (ld.elf_so) bug. At least _two_ on 11.0_BETA,
in fact.
1. In 11.0_BETA, the new GNU ld(1) now creates 4 LOAD segments in an executable.
In 10.x and prev. versions, there were only 2 LOAD segments.
The ld.elf_so(1) in 11.0 and -HEAD hasn't been updated to account for this,
it looks like, so the runtime linker picks the wrong segment size (much
smaller that reqd.) when it goes to patch the text relocation addresses
(only on i386).
2. ASLR also doesn't seem to be accounted for. dosbox(1) works perfectly on
NetBSD/i386 10.x if your turn off ASLR (the only bug there).
File a PR.
-RVP