From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3715 invoked by alias); 11 May 2011 10:30:21 -0000 Received: (qmail 3707 invoked by uid 22791); 11 May 2011 10:30:19 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-px0-f171.google.com (HELO mail-px0-f171.google.com) (209.85.212.171) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 11 May 2011 10:30:03 +0000 Received: by pxi7 with SMTP id 7so259960pxi.30 for ; Wed, 11 May 2011 03:30:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.1.103 with SMTP id 7mr5369610pbl.81.1305109803056; Wed, 11 May 2011 03:30:03 -0700 (PDT) Received: by 10.68.52.135 with HTTP; Wed, 11 May 2011 03:30:03 -0700 (PDT) In-Reply-To: References: Date: Wed, 11 May 2011 10:30:00 -0000 Message-ID: Subject: Re: GNU as and assembler listing and -pipe and gcc!!!... From: Steffen Dettmer To: binutils@sourceware.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-05/txt/msg00140.txt.bz2 * On Wed, May 11, 2011 at 11:12 AM, ali hagigat wrot= e: > Note if the assembler source is coming from the standard input > (eg because it is being created by gcc and the =E2=80=98-pipe=E2=80=99 co= mmand > line switch is being used) then the listing will not contain > any comments or preprocessor directives. This is because the > listing code bu=EF=AC=80ers input source lines from stdin only after > they have been preprocessed by the assembler. This reduces > memory usage and makes the code more e=EF=AC=83cient. > ------------------------------ > 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) =3D 3 +open("/tmp/cc83NG1i.o", O_RDWR|O_CREAT|O_EXCL, 0600) =3D 3 @@ -11 +10,0 @@ -open("/tmp/ccqiGQYT.o", O_RDWR|O_CREAT|O_EXCL, 0600) =3D 3 oki, Steffen