This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GNU as and assembler listing and -pipe and gcc!!!...


* 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 buïers input source lines from stdin only after
> they have been preprocessed by the assembler. This reduces
> memory usage and makes the code more eïcient.
> ------------------------------
> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]