delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/06/17/14:11:40

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Fri, 17 Jun 2005 14:11:28 -0400
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Problem with using stripped cygwin1.dll built from CVS
Message-ID: <20050617181128.GJ8532@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
References: <42A6298E DOT 303 AT acm DOT org> <42A62DAE DOT F4153556 AT dessent DOT net> <42A632C5 DOT 7040306 AT acm DOT org> <20050608084920 DOT GN23172 AT calimero DOT vinschen DOT de> <20050608143656 DOT GB17698 AT trixie DOT casa DOT cgf DOT cx> <20050608214341 DOT GA21349 AT trixie DOT casa DOT cgf DOT cx> <Pine DOT CYG DOT 4 DOT 58 DOT 0506170925200 DOT 2440 AT PC1163-8460-XP DOT flightsafety DOT com> <20050617143751 DOT GE8532 AT trixie DOT casa DOT cgf DOT cx> <Pine DOT CYG DOT 4 DOT 58 DOT 0506171023520 DOT 2440 AT PC1163-8460-XP DOT flightsafety DOT com>
Mime-Version: 1.0
In-Reply-To: <Pine.CYG.4.58.0506171023520.2440@PC1163-8460-XP.flightsafety.com>
User-Agent: Mutt/1.5.8i

On Fri, Jun 17, 2005 at 10:30:55AM -0500, Brian Ford wrote:
>On Fri, 17 Jun 2005, Christopher Faylor wrote:
>>On Fri, Jun 17, 2005 at 09:29:48AM -0500, Brian Ford wrote:
>>>I wish I would have known this was possible while working on DWARF 2
>>>debugging.  Everything I read stated: "If it has a section header,
>>>Windows' brain dead loader will load it regardless of section
>>>attributes".  I hope it really works on all supported platforms.
>>
>>It's a documented field in PE's section header, so I don't see why it
>>wouldn't work.  The only brain-dead thing that the loader does is to go
>>ahead and load a section into memory if it is marked as readable or
>>writable as well as noload.
>
>Thanks for the reply.
>
>By it, can I assume you meant IMAGE_SCN_TYPE_NOLOAD?

Actually, I was talking about IMAGE_SCN_TYPE_DISCARDABLE and
IMAGE_SCN_TYPE_REMOVE.

See:
  http://sources.redhat.com/ml/binutils-cvs/2005-06/msg00084.html
and
  http://sources.redhat.com/ml/binutils-cvs/2005-06/msg00087.html

for the binutils changes.

FWIW, MSVC's dumpbin program now says this about the sections:

  .
  .
  .
  SECTION HEADER #B
  .cygheap name
    104000 virtual size
    149000 virtual address
	 0 size of raw data
	 0 file pointer to raw data
	 0 file pointer to relocation table
	 0 file pointer to line numbers
	 0 number of relocations
	 0 number of line numbers
  C0000080 flags				# section is loaded
	   Uninitialized Data
	   Read Write

  SECTION HEADER #C
     .stab name
    24C138 virtual size
    24D000 virtual address
    24C200 size of raw data
    13A000 file pointer to raw data
	 0 file pointer to relocation table
	 0 file pointer to line numbers
	 0 number of relocations
	 0 number of line numbers
   2000800 flags
	   Remove				# section is not
	   Discardable				# loaded

  SECTION HEADER #D
  .stabstr name
    4CE719 virtual size
    49A000 virtual address
    4CE800 size of raw data
    386200 file pointer to raw data
	 0 file pointer to relocation table
	 0 file pointer to line numbers
	 0 number of relocations
	 0 number of line numbers
   2000800 flags
	   Remove				# section is not
	   Discardable				# loaded

cgf

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

- Raw text -


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