www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/07/14:06:41

Xref: news2.mv.net comp.os.msdos.djgpp:4703
Newsgroups: comp.os.msdos.djgpp
From: jmv9w AT hal DOT ee DOT Virginia DOT EDU (Jim Varanelli)
Subject: Re: Program too big to fit in memory
Message-ID: <DsMuyt.Iu2@murdoch.acc.Virginia.EDU>
Sender: usenet AT murdoch DOT acc DOT Virginia DOT EDU
Organization: University of Virginia
References: <Pine DOT SUN DOT 3 DOT 91 DOT 960606081305 DOT 27903B-100000 AT is>
Date: Fri, 7 Jun 1996 14:01:41 GMT
Lines: 50
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> writes:
|> 
|> On Wed, 5 Jun 1996, Daniel Vernon Bailey wrote:
|> 
|> > I'm getting the error Program too big to fit in memory when I attempt to
|> > run any applications I compile with djgpp 2.0 with no patches.  The two
|> > 
|> > ld -Tdjgpp.lnk -o dss.exe *.o libgmp.a libc.a libm.a libpc.a libgcc.a
|> 
|> It is usually a bad idea to run ld directly, as chances are you don't 
|> construct its complex command line correctly.  Just call gcc to do the 
|> job and forget about your pains:
|> 
|> 	gcc -o dss.exe *.o -lgmp
|> 
|> (and you can forget about all those standard libraries as a bonus, too).
|> 
|> Btw, I think the real problem in your ld command line is that you forgot 
|> crt0.o which is the startup file and without which DOS tries to load 
|> dss.exe as real-mode DOS program and of course fails.  But why bother to 
|> pursue this matter, when a correct solution is so much easier and 
|> straightforward?

Well, I'm using the method you suggest and still get "Program too big"
errors. I tried compiling with crt0.o and got a bunch of error messages
similar to the following:

fake(.data+0x0): multiple definition of 'start'
fake(.text+0x0): first defined here

My original make file is:

gcc -c -O2 adept.c
gcc -c -O2 genlist.c
gcc -c -O2 feedback.c
gcc -c -O2 tbench.c
gcc -c -O2 tree.c
gcc -c -O2 sigtype.c
gcc -c -O2 list.c
gcc -o genlist.exe *.o

The executable is only 75K.
Thanks for your help!!
Jim

-- 
Jim Varanelli                        Center for Semicustom Integrated Systems
Research Scientist                   Department of Electrical Engineering
varanelli AT virginia DOT edu               University of Virginia
http://csis.ee.virginia.edu/~jmv9w/  Charlottesville, VA 22903

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019