Re:Go memory ballast: How I learnt to stop worrying and love...
by jchw on Monday December 02, 2019 @01:22PM
(#21685141)
Not really, because the entrypoint of executables is OS dependent and may not resemble the “main” function signature. I actually don’t know what Linux dumps on the stack/registers before calling your entrypoint, though, to be honest.
[ Parent
| on HN ]
Re:Go memory ballast: How I learnt to stop worrying and love...
by saagarjha on Monday December 02, 2019 @01:42PM
(#21685367)
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...