This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Invalid Win32 executable


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]