X-Recipient: archive-cygwin@delorie.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@mail.gmail.com> 	 <20091106113229.GC26344@calimero.vinschen.de> 	 <4AF449B4.6080300@cwilson.fastmail.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@googlemail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

2009/11/6 Charles Wilson <cygwin@cwilson.fastmail.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

