delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/27/13:35:52

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Message-ID: <3F9D66B9.10407@garagegames.com>
Date: Mon, 27 Oct 2003 10:40:57 -0800
From: Tim Gift <timg AT garagegames DOT com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030917 Thunderbird/0.3a
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Invalid Win32 executable
Note-from-DJ: This may be spam

Cygwin gcc/ld sometimes generates executable that won't load (I'm using
Windows 2000) unless I remove the .stab and .stabstr sections using 
strip.  This currently only happens for one of my executables, others
compile and run/debug fine.  There are several older references in the 
mailing list archives about similar loading problems, but their causes 
appeared to be different (ie. memory gaps in the PE sections, or ordering 
problems). I'm using the gcc 3.3.1, and ld version 2.14.90.

The executable appears to be correct, it's "MS Windows PE 32-bit Intel 
80386 console executable not relocatable" and information obtained from 
objdump appears to be fine, except for the SizeOfHeaders field which
is 0. Comparing the "objdump -fhp" output of the stripped and unstripped 
versions revealed that the SizeOfHeaders is the only difference
(besides the removed .stab sections and the expected checksum, image
size, and flag differences); SizeOfHeaders is 0 on the unstripped exe,
but is 400 in the stripped version.... the stripped exe loads and runs
fine.

I don't know enough about the PE format to know if this is really a
problem, but it's the only difference I've found so far. If the 0
SizeOfHeaders is the problem...  is it a known bug with the linker?

Any thoughts or clues would be appreciated.

Tim Gift
GarageGames




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