public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Invalid Win32 executable
@ 2003-10-27 20:14 Tim Gift
  0 siblings, 0 replies; only message in thread
From: Tim Gift @ 2003-10-27 20:14 UTC (permalink / raw)
  To: cygwin

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/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-10-27 18:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-27 20:14 Invalid Win32 executable Tim Gift

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).