Find the answer to your Linux question:
Results 1 to 2 of 2

Thread: Fork in GCC

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Fork in GCC

    Can anyone explain,how gcc works. I am totally confused.


  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Harrow, UK
    I'm not sure precisely what your problem is, but gcc basically does a triple pass over your code.

    The first pass is carried out by a preprocessor which does global edits: comments are removed, header files inserted, named constants replaced by their values, etc.

    The second pass, carried out by gcc itself, is the compilation proper: your code is replaced by object (machine) code.

    The third pass is the linking, carried out by a program called ld: the object code modules are linked to each other (if there is more than one) and to the C library and any other libraries that you have invoked.

    Result: One executable file, ready to run.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts