|
From: Gisle V. <gv...@br...> - 2003-10-27 01:24:13
|
Why won't the linker strip the symbols from the .exe or put a valid PE header when doing: gcc -s -o test.exe test.o Windows refuses to run it. AFAICS because the PE header says there are debug-symbols there, but the debug data-directory is empty. Only running strip in it allows the program to run. The only difference according to PEDUMP is: --- test.dump-not-stripped Mon Oct 26 22:04:23 2003 +++ test.dump-stripped Mon Oct 26 22:04:37 2003 @@ -3,8 +3,8 @@ File Header Machine: 014C (I386) Number of Sections: 0005 - TimeDateStamp: 3F9C6DA5 -> Mon Oct 26 22:03:13 2003 - PointerToSymbolTable: 00036400 + TimeDateStamp: 3F9C6F1C -> Mon Oct 26 22:03:28 2003 + PointerToSymbolTable: 00000000 NumberOfSymbols: 00000000 SizeOfOptionalHeader: 00E0 Characteristics: 020F @@ -30,9 +30,9 @@ image version 1.00 subsystem version 4.00 Win32 Version 0 - size of image 3B000 - size of headers 0 - checksum 41224 + size of image 3C000 + size of headers 400 + checksum 39847 Subsystem 0003 (Windows character) I'm not sure it's something to do with the binutils tools, but rather some internals of Windows (since the latest hofixes). Anybody got any experience with this? I'm using MingW gcc 3.3.1 and binutils (ld version 2.13.90 20030111). --gv |