From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: Can I split my EXE-file into a EXE-file and a OBJ-file? Date: Sun, 29 Mar 1998 12:48:34 -0500 Organization: Two pounds of chaos and a pinch of salt. Lines: 34 Message-ID: <351E8972.5271@cs.com> References: <3 DOT 0 DOT 5 DOT 32 DOT 19980329185712 DOT 007a4430 AT vip DOT cybercity DOT dk> NNTP-Posting-Host: ppp217.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Nils Emil P. Larsen wrote: > > >What bothers you about your EXE being large? I personally would *rather* > >have one large executable than a multitude of smaller files. > > I don't know why, but I diden't like EXE-files larger than 50 KB and I have > no technical reason for that.... > Do I need to change my code before DLX can split it? Can I call that kind > of splitting run-time linking? Like I said, chapter 8.15 of the FAQ describes ways to reduce the size of DJGPP executable files without using any external code like DXE or DLX (or DLM or whatever...). The steps to take are as follows: - Include , and define empty versions of one or more of these functions: __crt0_glob_function(), __crt0_load_environment_file(), and __crt0_setup_arguments(). Look them up to see the proper argument syntax; for example, your __crt0_glob_function() should return NULL. You can only do this if you don't need the services that those functions provide: namely, command line globbing, loading environment settings from 'djgpp.env', and creating main's argc and argv. - Use the DJP executable packer, which can runtime-compress DJGPP executables. It's available on SimTel as v2misc/mlp106b.zip. Since the startup code comprises about 90% of that 50K executable, breaking the library code out won't help in the slightest. -- --------------------------------------------------------------------- | John M. Aldrich | "A woman is not property, and hus- | | aka Fighteer I | bands who think otherwise are living | | mailto:fighteer AT cs DOT com | in a dreamworld." | | http://www.cs.com/fighteer | - Lazarus Long | ---------------------------------------------------------------------