Hello people!
First of all, I'd like to thank you all that work on the development of the GPC compiler. It's a really good work.
But I have a question, that I don't know exactly if it's run-time system's matter or a linker's matter.
I'm using the following GPC (I've downloaded the binaries from the site):
----- gpc -v ----- Reading specs from c:\usr\mingw\bin..\lib\gcc-lib\mingw32\3.2.3\specs Configured with: /src/mingw/gcc-3.2.3-20030504-1/configure --srcdir=/src/mingw/gcc-3.2.3-20030504-1 --enable-languages=pascal --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --disable-win32-registry --disable-shared --enable-sjlj-exceptions Thread model: win32 gpc version 20030830, based on gcc-3.2.3 (mingw special 20030504-1) -----
Consider the size of the following source and executable files:
----- cat hello.pas ----- PROGRAM hello;
BEGIN writeln ('Hello world!'); END. -----
Consider the size of the following source and executable files, after compilation:
----- gpc -o hello hello.pas ----- hello.pas 60 bytes hello.exe 707.791 bytes -----
Why is the executable file so big? What is this overhead generated for every program created with the above GPC? The program LD has the option of stripping off all the symbols. Doing that I've got the following:
----- gpc -Wl,-s -o hello hello.pas ----- hello.pas 60 bytes hello.exe 247.808 bytes -----
But I still think this is a big executable. There is a way to reduce this overhead?
Thank you in advance.
Andre
On 20 Apr 2004 at 9:30, André Eduardo Gabriel da Silva wrote:
[...]
Consider the size of the following source and executable files, after compilation:
----- gpc -o hello hello.pas ----- hello.pas 60 bytes hello.exe 707.791 bytes
Why is the executable file so big? What is this overhead generated for every program created with the above GPC? The program LD has the option of stripping off all the symbols. Doing that I've got the following:
----- gpc -Wl,-s -o hello hello.pas ----- hello.pas 60 bytes hello.exe 247.808 bytes
But I still think this is a big executable. There is a way to reduce this overhead?
This has been discussed many times before. See: http://www.gnu-pascal.de/crystal/gpc/en/mail9748.html
Best regards, The Chief --------- Prof. Abimbola Olowofoyeku (The African Chief) Web: http://www.bigfoot.com/~african_chief/
Prof. Abimbola Olowofoyeku (The African Chief) wrote:
This has been discussed many times before. See: http://www.gnu-pascal.de/crystal/gpc/en/mail9748.html
More info is in: http://www.gnu-pascal.de/crystal/gpc/en/thread9920.html
Also, Ada folks have patches to binutils and gcc to make smart-linking usable with shared libraries, but it will take some time befor the patches will be in released versions.