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, 14.01.2013, 04:52

> This is a discussion that could go on forever. Unfortunately, most people
> aren't interested, hence the difficulty in discovering good answers (sigh).
> Honestly, I wouldn't worry too too hard about it unless you're just super
> obsessed! ;-) BTW, OpenWatcom can indeed make smaller (esp. 16-bit)
> binaries, but it depends on what you're trying to do, how standard (C89,
> C99) you need support and how much OpenWatcom supports (esp. libc).
>
> Here's just some rough ideas off the top of my head:
>
> * check linker map (mkdir() function pulling in ctime.o without reason?)
> * recompile (parts of) libs with -Os or -O1 ("ar rvs libblah.a smaller.o")
> * recompile (parts of) libs with stripped functionality or hand-written
> assembly
> * avoid printf (and related) in lieu of _dos_write (etc.)
> * use empty cmdline glob function
> * 2.03p2 (no true symlink support in libc)
> * strip ("gcc -s" or "ld -s" or "strip blah.exe")
> * compare various (-O1 or -Os or -O2) with UPX --ultra-brute --small
> * -fomit-frame-pointer
> * -fno-align-functions, -fno-align-labels, -fno-align-loops,
> -fno-align-jumps
> * -march=i386, -march=i486, -march=i586
> * don't bind DPMI host, use default 2 kb stub, leave CWSDPMI separate

How many of these you did in your djgpp203.7z?

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 204 users online (0 registered, 204 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum