4 ms·
On a freestanding environment, the signature of main doesn't have to be the standard "int main(int argc, char argv)". Oh, and on Linux the the arguments to main
by saagarjha 7y ago
On a freestanding environment, the signature of main doesn't have to be the standard "int main(int argc, char argv)". Oh, and on Linux the the arguments to main are put on the stack, which you can see is handled by _start: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86_64/start.S;h=ae08f98180e45f39402459747e462da8d94bb64d;hb=HEAD https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86...