Confusions regarding the GCC compilation steps

This is a discussion on Confusions regarding the GCC compilation steps within the C Programming forums, part of the General Programming Boards category; After preprocessing, in the second step namely "Compilation", an object file gets generated. I wanted to know what are the ...

  1. #1
    Noob AnishaKaul's Avatar
    Join Date
    Jan 2010
    Location
    Gurgaon, India
    Posts
    115

    Confusions regarding the GCC compilation steps

    After preprocessing, in the second step namely "Compilation", an object file gets generated.

    I wanted to know what are the contents of an "Object file" ? Is it machine code ?

    Kindly explain !

  2. #2
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,657

  3. #3
    Registered User
    Join Date
    May 2009
    Posts
    2,771
    Quote Originally Posted by AnishaKaul View Post
    ... Object file ... Is it machine code ?
    The answer is both yes and no.

    Tim S.

  4. #4
    Noob AnishaKaul's Avatar
    Join Date
    Jan 2010
    Location
    Gurgaon, India
    Posts
    115
    Quote Originally Posted by rags_to_riches View Post
    Thanks for replying but I had already searched Google with the similar keywords, I couldn't get my doubt clarified that's why posted here.

    The GCC manual by Richard Stallman says:
    -c
    Compile or assemble the source files, but do not link.
    and I was confusing this with the second step i.e. "compilation"

    I was thinking that the -c option performs the second step and produces the machine code !

    Now I have clarified this doubt of mine.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling GNU MP
    By mattnp12 in forum C Programming
    Replies: 3
    Last Post: 06-23-2011, 04:58 PM
  2. Undefined reference to...
    By legendus in forum C Programming
    Replies: 19
    Last Post: 10-25-2009, 07:18 AM
  3. Buidl Library with ./configure script
    By Jardon in forum C Programming
    Replies: 6
    Last Post: 07-24-2009, 10:36 AM
  4. Logical errors with seach function
    By Taka in forum C Programming
    Replies: 4
    Last Post: 09-18-2006, 06:20 AM
  5. Compilation error under Unix with GCC
    By marcusg in forum C Programming
    Replies: 2
    Last Post: 06-01-2005, 09:16 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21