From: Tim Gift <timg@garagegames.com>
To: cygwin@cygwin.com
Subject: Invalid Win32 executable
Date: Mon, 27 Oct 2003 20:14:00 -0000 [thread overview]
Message-ID: <3F9D66B9.10407@garagegames.com> (raw)
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/
reply other threads:[~2003-10-27 18:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F9D66B9.10407@garagegames.com \
--to=timg@garagegames.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).