Question about kernel randomization and relinking... It seems to take a fair amount of RAM, at least for systems that are forced to run i386. And I mean real RAM -- swap doesn't seem to cut it.
I discovered that several machines I was intending on using for minimal purposes just couldn't complete relinking. So I built a VM and started playing with the RAM. Built with 1G RAM, default was a 1.2G swap, worked fine. Reduced to 256MB RAM, Kernel failed to relink. As with my old junk. The magic number seemed to be between 320MB (failed) and 384MB (worked) of RAM. Ok, fine. Kernel relinking is important, I get that. Probably time to start tossing old junk. I get that, too. I'm not complaining about the forcible retirement of some of my old junk. I'm just curious why swap didn't "fix" this problem. But that VM failed at 320MB RAM, even though it had 1.2G of swap, mostly unused (MOSTLY. Yes, it was going into swap). Is there a semi-layperson's explanation of this? Or is this a "if you got to ask, you won't understand" kind of thing? And here's the relink log from my VM, but the ones from my physical boxes looked pretty similiar. $ cat relink.log (SHA256) /bsd: OK LD="ld" LDFLAGS="-g" sh makegap.sh 0xcccccccc gapdummy.o ld -T ld.script -X --warn-common -nopie -o newbsd ${SYSTEM_HEAD} vers.o ${OBJS} text data bss dec hex 0 0 0 0 0 mv newbsd newbsd.gdb ctfstrip -S -o newbsd newbsd.gdb strip: there are no sections to be copied! rm -f bsd.gdb mv -f newbsd bsd mv: newbsd: No such file or directory *** Error 1 in /usr/share/relink/kernel/GENERIC.MP (Makefile:1131 'newbsd') I also found that a 320MB machine could not build the kernel from scratch. Nothing used much memory until the ld step, which started using large amounts of memory and some swap, and errored out the same way: LD="ld" LDFLAGS="-g" sh makegap.sh 0xcccccccc gapdummy.o ld -T ld.script -X --warn-common -nopie -o bsd ${SYSTEM_HEAD} vers.o ${OBJS} text data bss dec hex 0 0 0 0 0 mv bsd bsd.gdb ctfstrip -S -o bsd bsd.gdb strip: there are no sections to be copied! Thanks! Nick.