delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/21/03:43:48

Date: Thu, 21 Aug 1997 10:41:56 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Vlatko Surlan <vsurlan AT jagor DOT srce DOT hr>
cc: djgpp AT delorie DOT com
Subject: Re: Is there a way ???
In-Reply-To: <5t6ljd$gcf@bagan.srce.hr>
Message-ID: <Pine.SUN.3.91.970821103520.26010N-100000@is>
MIME-Version: 1.0

On 17 Aug 1997, Vlatko Surlan wrote:

> Could I compile my C files with gcc to assemblers code
> and then continue with assembler and if so
> would exe from assembler be any smaller than with
> gcc.

You will get the same .exe size, I think.  The bloat is not caused by the
compiler, it's because the startup code calls library functions that are
added to your code.  If you want to avoid linking those functions, you
will have to write your own startup code. 

I fail to understand why would somebody be so excited about extra 20KB to 
go to such lengths.  (If your program is much larger, use -s switch when 
you compile, for starters.  See section 8.15 of the DJGPP FAQ list.)

> Btw. can I do it with Ms Dos Debug and how???

No, DEBUG doesn't understand the AT&T assembly syntax emitted by GCC, so 
you can't.

> I would like to messure speed diferencies between
> assem. and gcc exe's.

You won't see any difference by assemblying the code emitted by GCC,
because you will assemble the same code that GCC passes to the assembler. 
You will have to rewrite code in hand-optimized assembly to see any
difference at all. 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019