I'm learning about how Linux works and for that I'm watching Tutorial: Building the Simplest Possible Linux System by Rob Landley. He basically goes through some steps to build a minimal system and around 20:00 he starts explaining about building a "hello world binary" that he will later use as the init program for the kernel to run as the very first program.
My question is, why do I have to statically link the hello.c application I want to use as the init application for the kernel to run after booting (as mentioned at 21:39 and seen at 23:05)?
systemd
seems to be dynamically linked:sudo file -L /proc/1/exe
=>/proc/1/exe: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked ...
– muru Dec 28 '21 at 06:03fstab
), so you could see how this becomes a problem. – aviro Dec 28 '21 at 08:04