[TriLUG] what do crt[1in].o do?

Brian McCullough bdmc at bdmcc-us.com
Wed Dec 9 13:07:51 EST 2009


On Wed, Dec 09, 2009 at 08:10:37AM -0800, Joseph Mack NA3T wrote:
> On Wed, 9 Dec 2009, Rodney Radford wrote:
>
>> setting up the stack, setting up heap, and grabbing the values of argc, 
>> argv, and envp for your main program, and opening stdin, stdout and 
>> stderr.
>
> thanks good to know. I haven't been able to find this anywhere with 
> google and it's not in K&R II or Harbison and Steel (another C book)

Those books are about the C language, not this particular implementation of the C language.



> I assume this is common knowledge somewhere. Is this found in undergrad 
> CS books?

I would doubt it.  Where I would look would be the "Internals" documentation for the GCC compiler system.


Not all C compilers look like this.  However, I do remember from a "few" years ago, that the PL/I F compiler ( early '70s vintage ) binary output ( executable ) did have some similarities, so I suspect that this technique is taught, perhaps in senior Compiler-Building classes.  Come to think of it, you might want to look at Minix, too. ( Perhaps the Dragon book. )


Brian





More information about the TriLUG mailing list