www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/11/06/06:32:51

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 6 Nov 2009 12:32:29 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: small exe size increase from 1.7.0-62 to -63
Message-ID: <20091106113229.GC26344@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <416096c60911052218x1cca9a65w7e5b607175422f82 AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <416096c60911052218x1cca9a65w7e5b607175422f82@mail.gmail.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Nov  6 06:18, Andy Koppe wrote:
> A test with an empty main compiled using gcc-4 under cygwin-1.7.0-63
> has a size of 6.5K. After downgrading to 1.7.0-62, without changing
> anything else, the size goes down to 5.0K.
> 
> $ cat test.c
> int main(void)
> {
>   return 0;
> }
> $ gcc test.c -Os -s
> 
> Looking at objdump differences, both code and data size have gone up:
> 
> < SizeOfCode            00000800
> < SizeOfInitializedData 00001000
> ---
> > SizeOfCode            00000e00
> > SizeOfInitializedData 00001600
> 
> And we're pulling in a bunch of additional functions from cygwin1.dll
> and kernel32.dll:
> 
> >       515c      666  abort
> >       5170      788  cygwin_create_path
> >       51b0      812  dll_dllcrt0
> >       51d4     1221  memcpy
> >       51ec     1620  strlen
> >       51f8     1742  vsnprintf
> 
> >       5238      336  GetModuleFileNameW
> >       5274      388  GetStdHandle
> >       5284      798  VirtualProtect
> >       5296      801  VirtualQuery
> >       52a6      827  WriteFile
> 
> Obviously 1.5K isn't much of a concern, but is this expected?

It's a result of the new pseudo reloc v2 support.  Probably Chuck can
explain this better.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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