Talk:Crt0

Latest comment: 11 years ago by Nyh in topic Missing context

how about the "0" in crt0? Homelien (talk) 21:10, 5 August 2008 (UTC)Reply

Done! 128.2.211.153 (talk) 19:38, 6 September 2011 (UTC)Reply

Missing context edit

The introduction paragraph lacks any context of what this "crt0" is related to. Is it a general computing concept, specific to Unix, to Linux, or to Gcc? As far as I know, it is a very old Unix concept (I seem to remember it already when using Unix in the end of the 80s), and is not specific to gcc, as the numerous gcc references in the current text seem to imply. Also, while in old Unixes I actually remember a /lib/crt0.o, on my current Linux system, such a file doesn't exist - there are similar files like crt1, crtn, crtbegin, crtend, and other stuff. It should be perhaps explained that "crt0" existed as such on older systems (if that is indeed the case) but later systems replaced it by (what). Nyh (talk) 12:18, 17 July 2012 (UTC)Reply

I found a plausible explanation [1] of why crt0 was replaced by crt1, crtbegin, crtend: The original crt0 only knew how to run main(), but the newer trio knows how to first run the program's constructors (C++ programs, for example, allow constructors of static objects to run before main()), then run main(), and then run the program's destructors. I think we should explain the concept of crt0, and explain how the existing program startup mechanism has evolved since this original concept. Nyh (talk) 12:26, 17 July 2012 (UTC)Reply