Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

how to create small DJGPP binaries? (Developers)

posted by roytam, 12.01.2013, 14:27

> > Besides compressing with UPX, how can I create smaller DJGPP binaries?
> > or say, which DJGPP gcc creates smaller binaries? any compiler switches
> can
> > reduce binary size without performance impact?
> > Can OpenWatcom C drop-in replacing DJGPP gcc here?
>
> There's not much to do, you can revert to older versions of DJDEV and GCC
> as newer makes bigger code. I observed that during time the compressed size
> of simple exe growed about 15kB from old gcc 3.x to latest 4.7.2. It's not
> so much. You can save some space using CRT flags to disable some functions
> like command line processing - if you dont need e.g. wildcards expansion,
> environment... this can save some kB. Also you can implement your own
> better libc. Small command line utils I wrote are usually 50-60kB after
> compression, one complex tool about 100kB, not bad for me...

hmm.
with old gcc 2.7.2.3, it does reduce a bit.

the final product, lha for Unix 1.14i-ac compiled and compressed and D3X-stubbed:
http://roy.orz.hm/soft/lha_d3x.exe 84,976 bytes

BTW I made D3X with apack compressed stubs working by accident! When I'm debugging why compressed stub not working by adding debug instructions in exitErr, it works compressed! so d3xd(the coff stub) is now 7KB! Sources and binary here:
http://roy.orz.hm/soft/d3x090h-apack.7z

D3X-apack-stubbed:
http://roy.orz.hm/soft/lha_d3x_.exe 81,904 bytes

 

Complete thread:

Back to the forum
Board view  Mix view
22752 Postings in 2119 Threads, 402 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum