From: Shanks <mshanks79@yahoo.co.in>
To: linux-c-programming@vger.kernel.org
Subject: gcc -S option
Date: Fri, 14 Mar 2003 10:40:46 -0800 (PST) [thread overview]
Message-ID: <20030314184046.85169.qmail@web8006.mail.in.yahoo.com> (raw)
Hi,
Assume hypothetical C code below
int
main()
{
int t;
t += 1;
return 0;
}
When i compile this code using -S option on a *solaris* box using
the *solaris* compiler, i get following .s file
! File a.c:
! 1 int
! 2 main()
! 3 {
! 4 int t;
! 5
! 6 t += 1;
add %i5,1,%i5
! 7 return 0;
mov %g0,%i0
jmp %i7+8
restore
As you can see above, the .s file generated is of following
format:
- C code block
- Corresponding Assembly code
However when i do the same thing using gcc i get *only* the
assembly code and not the corresponding C code also.
Can someone tell me if i need to pass some extra options
while compiling using gcc to get the desired data.
Right now i am generating .s as follows
$ gcc -S a.c
Thanks in advance,
Shanks
__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com
next reply other threads:[~2003-03-14 18:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-14 18:40 Shanks [this message]
2003-03-14 18:56 ` gcc -S option Elias Athanasopoulos
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=20030314184046.85169.qmail@web8006.mail.in.yahoo.com \
--to=mshanks79@yahoo.co.in \
--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).