Jonathan Matthew wrote:

> lld has a --no-mmap-output-file option that causes it to use plain write(2)
> calls to generate the output file. Perhaps it'd be worth using that for
> kernel linking and other stuff we relink at boot time?

This actually worked:

$ cat relink.log               
(SHA256) /bsd: OK
LD="ld" sh makegap.sh 0xcccccccc gapdummy.o
ld -T ld.script -X --warn-common -nopie --no-mmap-output-file -o newbsd 
${SYSTEM_HEAD} vers.o ${OBJS}
LLVM ERROR: IO failure on output stream: No space left on device
*** Error 1 in /usr/share/relink/kernel/GENERIC (Makefile:2432 'newbsd': @echo 
ld -T ld.script -X --warn-common -nopie --no-mmap-output-file...)

It is also completely undocumented.

I suspect this flag was added to lld after the man page was last updated.

Reply via email to