3 ms·
> Now, attempting to link a standalone executable without a '_start' symbol, on the other hand... GNU ld and gold both support --entry to change the entry poin
by prattmic 9y ago
> Now, attempting to link a standalone executable without a '_start' symbol, on the other hand...
GNU ld and gold both support --entry to change the entry point. Alternatively, you can specify it in your linker script.
https://gist.github.com/prattmic/1f3618025aab52b0e90e88445b6fc7d4 https://gist.github.com/prattmic/1f3618025aab52b0e90e88445b6...
$ gcc -nostdlib -ffreestanding -Wl,--entry=foobar -o main main.S
$ ./main; echo $?
42