Relative Content

Tag Archive for cgcclinkeroperating-systemlibc

Compiling without a standard library but with the _start label (entry point)

I am building my own 32-bit x86 OS in which I load user programs from ELF files. When compiling the user programs I use -nostdlib to exclude GLIBC and link my own LIBC instead. The problem is that by doing so, the program compiles without a _start label, causing the entry (defined in the ELF header) to point at the first piece of code in the file and not the actual entry of the program.