what happens before main

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2020-09-28 01:00:00 +00:00
parent 89593b97c2
commit 1c3eeb4d01

View File

@@ -22320,6 +22320,12 @@ You are now left on the very first instruction of our tiny executable!
This is analogous to <<baremetal-gdb-step-debug,step debugging baremetal examples>>.
Related:
* https://electronics.stackexchange.com/questions/258896/what-happens-before-main
* https://electronics.stackexchange.com/questions/55767/who-receives-the-value-returned-by-main
* https://stackoverflow.com/questions/53570678/what-happens-before-main-in-c "What happens before main in C++?"
===== nostartfiles programs
Assembly examples under `nostartfiles` directories can use the standard library, but they don't use the pre-`main` boilerplate and start directly at our explicitly given `_start`: