473,325 Members | 2,792 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

stages in compilation , linking and loading

what are the various stages in generating an object file (.o) from a .c file and then moving on to link the .o 's and libs (.a's) to form an executable?
the first step would be preprocesing. what after that ? when does assembly , compilation come into play ? any links where i could read upon how this entire process from .c to executable works ?
Jul 6 '07 #1
4 5359
Meetee
931 Expert Mod 512MB
what are the various stages in generating an object file (.o) from a .c file and then moving on to link the .o 's and libs (.a's) to form an executable?
the first step would be preprocesing. what after that ? when does assembly , compilation come into play ? any links where i could read upon how this entire process from .c to executable works ?

Google is the best friend!! :))
Jul 6 '07 #2
i actually went through wikipedia before i put up this question. but the idea is still not clear.

it says that compiling has two steps in it. the front end which does the the lexical analysis, synctactic analysis, preprocessing etc.

then you have the back ed which does the code optimization and generation of the machine language.

however, what is not clear is ->

-> after which stage is the .o being created (lets take linux OS as en example)
-> does the assembler come into play ? if yes, at which stage ?
Jul 6 '07 #3
Meetee
931 Expert Mod 512MB
i actually went through wikipedia before i put up this question. but the idea is still not clear.

it says that compiling has two steps in it. the front end which does the the lexical analysis, synctactic analysis, preprocessing etc.

then you have the back ed which does the code optimization and generation of the machine language.

however, what is not clear is ->

-> after which stage is the .o being created (lets take linux OS as en example)
-> does the assembler come into play ? if yes, at which stage ?

Check this..

http://cpp.comsci.us/process/build.html

There is a nice explanation given

:)
Jul 6 '07 #4
Meetee
931 Expert Mod 512MB
i actually went through wikipedia before i put up this question. but the idea is still not clear.

it says that compiling has two steps in it. the front end which does the the lexical analysis, synctactic analysis, preprocessing etc.

then you have the back ed which does the code optimization and generation of the machine language.

however, what is not clear is ->

-> after which stage is the .o being created (lets take linux OS as en example)
-> does the assembler come into play ? if yes, at which stage ?

This site
will give u an idea about assembler role in execution..!
Jul 6 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

20
by: Steven T. Hatton | last post by:
I just read this in the description of how C++ is supposed to be implemented: "All external object and function references are resolved. Library components are linked to satisfy external...
0
by: gasturbtec | last post by:
please help im new at access programming and i just got this project dropped in my lap because the old programmer quit. i've been doing ok so far but now i need to add code to an existing database...
11
by: Michael Gaab | last post by:
Compilation in c generally has four phases 1. Preprocessing 2. Compilation 3. Assembly 4. Linking. If I use a flag that will not link the code, order of compilation is not an issue,...
4
by: Ben | last post by:
I get an error when the compilator tries to link the object files of my program. I have the files group.h and group.c that use a struct define in logic.h and two fonctions define in logic.c. The...
12
by: wanghz | last post by:
Hi, Could I ask some questions about the conditional compilaion? Suppose I have three simple files: a.c, b.c and c.h /* --------a.c--------- */ #include <stdio.h> #include "c.h" int...
2
by: Tommy Vercetti | last post by:
In Visual Studio .NET 2003, I do the following 1) File->New->Project 2) Visual C++ Projects->.NET->Windows Forms Application 3) Project->Add New Item->C++ File 4) Clear the new C++ file and...
1
by: Anders Borum | last post by:
Hello! I was wondering if I am the only person missing the option of outputting a single dll for a website (just like the good old v1.1 compilation model)? What I'm looking for is the ASP.NET...
3
by: Jens Müller | last post by:
I have a file here with several enums: #ifndef PLANARSEP_OPTIMIZE_H #define PLANARSEP_OPTIMIZE_H enum fund_cycle_behavior_t {PASS_MODE_FIRST, PASS_MODE_BEST, PASS_MODE_ALL};
0
by: Tarik Monem | last post by:
I have been working on an all AJAX/DOM web site which is set to go live today and I thought I'd share my discoveries with all of you whom have helped me when I have encountered different issues along...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.