|
From: Paul G. <pga...@te...> - 2000-12-06 00:59:35
|
Hi folks, ah...win32s still lives! On 5 Dec 2000, at 13:40, the Illustrious Kai Ruottu wrote: > Appaiah Kumaraswamy wrote: > > > > Using his linking method, the executable size reduces > > drastically. > > > > gcc -c -o test.o test.c > > gcc -s -Wl,--stack,10000 -o app.exe > > -Wl,--base-file,app.b test.o dlltool --dllname app.exe > > --base-file app.b --output-exp app.e gcc -s -Wl,--stack,10000 > > -o app.exe -Wl,--base-file,app.b > > test.o -Wl,app.e > > dlltool --dllname app.exe --base-file app.b --output-exp > > app.e gcc -s -Wl,--stack,10000 -o app.exe test.o -Wl,app.e rm > > app.b rm app.e > > This seems to be obligatory for creating any Win32s binaries > with Mingw (an > updated one with import libs and startups for Win32s) now... > > > results with an executable of only 3584 bytes. This method also > > applies for larger code as well as C++ code. Actually, it adds > > relocation information to the code and can also be used to > > create relocatable DLLs. > > Is there now some single-pass method with '-shared' etc. to > create the > relocations using 'gcc' (which then uses 'ld') only ? > > Putting this to ones own makefiles isn't hard, but building GNU > stuff like > Cygnus Insight for Win32s needs special Makefiles with the > three-pass linking while producing the '.exe's... I have specific > sources with patched 'Makefile.in' files for Win32s now, but > having common sources for Win32/Win32s would be better. The size > isn't so important... Remember that cygwin with -mno-cygwin set (unless this has been changed in the last couple of weeks) assumes crtdll.dll as the interface. The msvcrt.dll won't generate win32s object code afaik...though I am open to correction on this. Also, it is important to note that win32s object code is typically larger than win32 object code due to the limitations of win32s (I am thinking of the need for .rsc or resource files that must be added to the object code to get a functioning executable, even though I have not dealt with win32s since WFW was categorized as "unsupported" by MS...). Peace, Paul G. > > Anyhow using this method for the Win32 binaries too could be > tried... I think I > have tried, creating relocatable executables, but the executables > being a little bigger, not smaller (when talking about those 1.5 > Mbyte-sized Insights)... > > Cheers, Kai > > _______________________________________________ > MinGW-users mailing list > Min...@li... > > You may change your MinGW Account Options at: > http://lists.sourceforge.net/mailman/listinfo/mingw-users > Nothing real can be threatened. Nothing unreal exists. |