Xref: utzoo comp.sys.att:9729 comp.sys.ibm.pc.programmer:1813 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!microsoft!richgi From: richgi@microsoft.UUCP (Richard GILLMANN) Newsgroups: comp.sys.att,comp.sys.ibm.pc.programmer Subject: Re: Smart linking of data segments Message-ID: <55056@microsoft.UUCP> Date: 5 Jun 90 17:29:26 GMT References: <1094.266605B1@onebdos.UUCP> <980@soleil.UUCP> <1205@tuewsd.win.tue.nl> Reply-To: richgi@microsoft.UUCP (Richard GILLMANN) Organization: Microsoft Corp., Redmond WA Lines: 15 In article <1205@tuewsd.win.tue.nl> wsineel@lso.win.tue.nl (e.vriezekolk) writes: >I have a small program which uses a number of 64Kb segements >for data storage. I am using MASM 4.0 and some linkers. >The problem is that my .exe includes all these segments, >though their contents are meaningless at load time. > >How can I convince MASM/link that she doesn't have to include >the data segements? Probably what you want is to allocate the memory dynamically at run time, by asking DOS for memory blocks. But you can do what you are currently doing and EXEPACK the resulting EXE. EXEPACK will run encode the EXE and eliminate the redundant info in the EXE file. EXEPACK is a linker option in recent MS linkers and a separate program shipped with older language products.