public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Steffen Dettmer <steffen.dettmer@googlemail.com>
To: binutils@sourceware.org
Subject: Re: GNU as and assembler listing and -pipe and gcc!!!...
Date: Wed, 11 May 2011 10:30:00 -0000	[thread overview]
Message-ID: <BANLkTin159Q3_GVxqjqr7GXW6HJb+uR8=w@mail.gmail.com> (raw)
In-Reply-To: <BANLkTik_PePsw+9YEANA7GmQCY3Sja+crg@mail.gmail.com>

* On Wed, May 11, 2011 at 11:12 AM, ali hagigat <hagigatali@gmail.com> wrote:
> Note if the assembler source is coming from the standard input
> (eg because it is being created by gcc and the ‘-pipe’ command
> line switch is being used) then the listing will not contain
> any comments or preprocessor directives. This is because the
> listing code buffers input source lines from stdin only after
> they have been preprocessed by the assembler. This reduces
> memory usage and makes the code more efficient.
> ------------------------------
> I have copied part of the as manual in the above.
>
> What is the relationship of the standard input, -pipe, gcc and as?

I'm sure it is exactly as documented above: gcc -pipe creates
standard input for as, like "cc | as".

> Please give a clear example for this part of GNU "as" manual.

$ gcc -pipe hello.c

saves a temp file:

$ strace -e open -oo1 gcc hello.c
$ strace -e open -oo2 gcc -pipe hello.c
$ diff -U 0 o1 o2
--- o1  2011-05-11 12:26:42.000000000 +0200
+++ o2  2011-05-11 12:26:45.000000000 +0200
@@ -9 +9 @@
-open("/tmp/cc0IkkR0.s", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
+open("/tmp/cc83NG1i.o", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
@@ -11 +10,0 @@
-open("/tmp/ccqiGQYT.o", O_RDWR|O_CREAT|O_EXCL, 0600) = 3


oki,

Steffen

      reply	other threads:[~2011-05-11 10:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-11  9:13 ali hagigat
2011-05-11 10:30 ` Steffen Dettmer [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='BANLkTin159Q3_GVxqjqr7GXW6HJb+uR8=w@mail.gmail.com' \
    --to=steffen.dettmer@googlemail.com \
    --cc=binutils@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).