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

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <4AF449B4.6080300@cwilson.fastmail.fm>
References: <416096c60911052218x1cca9a65w7e5b607175422f82 AT mail DOT gmail DOT com> <20091106113229 DOT GC26344 AT calimero DOT vinschen DOT de> <4AF449B4 DOT 6080300 AT cwilson DOT fastmail DOT fm>
Date: Fri, 6 Nov 2009 17:12:32 +0100
Message-ID: <90baa01f0911060812q577ef471n9cf66a002330db3c@mail.gmail.com>
Subject: Re: small exe size increase from 1.7.0-62 to -63
From: Kai Tietz <ktietz70 AT googlemail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
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

2009/11/6 Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>:
> Corinna Vinschen wrote:
>>> Obviously 1.5K isn't much of a concern, but is this expected?
>>
>> It's a result of the new pseudo reloc v2 support. =A0Probably Chuck can
>> explain this better.
>
> I guess I should keep my reader in thread mode...I don't know what I
> could add to Corinna's explanation, except to say that all DLLs and EXEs
> include the startup code for runtime pseudo-relocs. =A0It now handles both
> v1 and v2 versions -- and the v2 version requires additional code
> (there's [some of] your 1.5k). Also, there is now actual error handling,
> so that's the WriteFile and various string handling imports. Finally, in
> both v1 and v2 mode, we now use the Virtual* functions to temporarily
> mark read-only pages writeable in order to update the relocs.
>
> This *should* make it possible -- **later** -- to reverse the current
> binutils behavior on cygwin when --enable-auto-import. =A0Right now, in
> that situation, binutils merges .rdata with .data, and marks .text
> writable, which is...less than ideal.

Right, I can't say here more about it. Maybe one point is here of some
interest about version 2 relocation, too. The DLLs/EXE files linking
via pseudo-relocations to an DLL having much smaller PE-headers. This
has positive side-effect on startup time and to size of the physical
application size. Btw upcoming binutils (cvs head version) is modified
already to use version 2 for x86 targets by default.

Cheers,
Kai


--=20
|  (\_/) This is Bunny. Copy and paste
| (=3D'.'=3D) Bunny into your signature to help
| (")_(") him gain world domination

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