public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* GNU as and assembler listing and -pipe and gcc!!!...
@ 2011-05-11  9:13 ali hagigat
  2011-05-11 10:30 ` Steffen Dettmer
  0 siblings, 1 reply; 2+ messages in thread
From: ali hagigat @ 2011-05-11  9:13 UTC (permalink / raw)
  To: binutils

2.1 Enable Listings: ‘-a[cdhlns]’
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?
Please give a clear example for this part of GNU "as" manual.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: GNU as and assembler listing and -pipe and gcc!!!...
  2011-05-11  9:13 GNU as and assembler listing and -pipe and gcc!!! ali hagigat
@ 2011-05-11 10:30 ` Steffen Dettmer
  0 siblings, 0 replies; 2+ messages in thread
From: Steffen Dettmer @ 2011-05-11 10:30 UTC (permalink / raw)
  To: binutils

* 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-11 10:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-11  9:13 GNU as and assembler listing and -pipe and gcc!!! ali hagigat
2011-05-11 10:30 ` Steffen Dettmer

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).