From: Suciu Flavius <suciuflavius@tiscali.de>
To: linux-c-programming@vger.kernel.org
Subject: Re: C language(asm construct)
Date: Fri, 08 Oct 2004 08:02:18 -0700 [thread overview]
Message-ID: <ck59si$qsf$1@sea.gmane.org> (raw)
In-Reply-To: <20041006104403.96723.qmail@web52903.mail.yahoo.com>
Hi,
Steps:
1) write hello_world.c
2) the preprocesor parse you hello_world.c file, process every #
starting commands (like #include #define #ifdef ...) and generate a
temporary file
3) the compiler start it's job reading the c file, parsing it, checking
it for errors, optimizing it and generating an assembler file
4) the assembler generate than the obj files
5) the linker solve the libraries, global variables referencing, etc and
generate the executable which of course, is in machine code and platform
dependent.
Retain that step 4 can be optional, the compiler can generate object
files without an assembler, it depending on the compilers ;)
So, to move your compiler on another platform, you need a new assembler
and linker, the compiler can be the same. Look for example at GNU
Compiler family ;)
For more info read
Aho, Sethi, Ullman - Compilers Principles, Techinques, And Tools
Ankit Jain wrote:
> hi
>
> i want to know if this is correct? i am a bit confused
> about linker...i am talking this topic when we have a
> asm construct in our code.
>
> The compiler basically reads the .c program and
> converts it into assembly code.Now during this it
> neglects this assembler construct and leaves it for
> assembler.Assembler is the person which basically
> looks for this part of the code and changes it into
> machine code.
>
> thanks
>
> ankit
>
> ________________________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping"
> your friends today! Download Messenger Now
> http://uk.messenger.yahoo.com/download/index.html
> -
> To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2004-10-08 15:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-06 10:44 C language(asm construct) Ankit Jain
2004-10-06 21:47 ` passing host name from a structure Edward Parrilla
2004-10-06 22:44 ` Alphex Kaanoken
2004-10-07 2:02 ` Edward Parrilla
2004-10-07 5:03 ` Jeff Woods
2004-10-07 6:23 ` Edward Parrilla
2004-10-07 6:34 ` mapping client to port Edward Parrilla
2004-10-08 15:02 ` Suciu Flavius [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='ck59si$qsf$1@sea.gmane.org' \
--to=suciuflavius@tiscali.de \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).