On Mon, May 12, 2025 at 08:07:11PM +0200, Sebastien Marie wrote:
> > I suppose the same could occurs with lld (untested for now).
>
> I confirm it is the same problem with lld.
>
> $ cd /usr/share/relink/kernel/GENERIC.MP
> $ ld -T ld.script -X --warn-common -nopie -o /tmp/newbsd *.o && echo ok
>
> /tmp: write failed, file system is full
> ok
> $ ls -l /tmp/newbsd
> -rwxr-xr-x 1 semarie wheel 236434608 May 12 20:05 /tmp/newbsd*
>
> And my dmesg has the following:
> uvn_flush: obj=0xfffffd86e3311608, offset=0x16b0000. error during pageout.
> uvn_flush: WARNING: changes to page may be lost!
So this code is using mmapped files for writing, which makes proper
error handling extremely difficult or even impossible. Best bet is
making sure enough space is available before starting.
-Otto