🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #35402

Re: MPW LINK error - Global data area size.

#35402
From: Earle R. Horton
Date: Tue, 13 Dec 1988 17:54
39 lines
2539 bytes
In article <916@taurus.BITNET> <amy%TAURUS.BITNET@CUNYVM.CUNY.EDU> writes:
>I'm trying to link some objectcode and got a link error :
>Size of global data area: 88014
>link:Error More than 32,768 bytes of global variables : 88014
>etc ...

You have too much space allocated to global variables.  Chances are you
have some large arrays involved.  Try changing large arrays to dynamic
storage which you allocate with NewPtr or NewHandle.  We went through
this about six months ago here.  The conclusion was that yes, it is
unfortunate that you cannot have more than 32,768 bytes of global
variables, but that most of the time you can use dynamic storage to
get around this problem.

>I tried to use the '-ss 100000' option but it did not help (.. should it ..?)

No, this won't help at all.  The "-ss" option only refers to the
maximum CODE segment size.  In fact, the linker usually fails to link
large code segments, too, because offsets within the segment will be
larger than 32,768 bytes.  The only case where I have found this
option useful is when the total size of the object modules to be
linked is > 32k, but the final linked segment is < 32k.  Using "-ss"
with a large number in this case prevents the linker from breaking up
your code into segments, which is appropriate if you are building a
non-application code resource.

>Any one outthere have any idea that could help ?
>(I'm using Mac Se with MPW version 2.0.2 )

In the aforementioned discussion it came out that MPW v 3.0 WOULD
support large data.  If this is true, and you can afford the upgrade,
then maybe you should get it.  Aztec C, by Manx Software Systems, does
support large data on the Macintosh, you can get a non-beta version of
it now, and it is (mostly) source-code compatible with MPW C.  This
doesn't help much if you are programming in Pascal, but it might if
you are programming in C.
Earle R. Horton. 23 Fletcher Circle, Hanover, NH 03755
(603) 643-4109
Graduate student.
Technical Details
Message-ID: <11450@dartvax.Dartmouth.EDU>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!purdue!bu-cs!dartvax!eleazar.dartmouth.edu!earleh
References: <916@taurus.BITNET>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!purdue!bu-cs!dartvax!eleazar.dartmouth.edu!earleh
From: earleh@eleazar.dartmouth.edu (Earle R. Horton)
Newsgroups: comp.sys.mac,comp.sys.mac.programmer
Subject: Re: MPW LINK error - Global data area size.
Keywords: MPW LINK
Message-ID: <11450@dartvax.Dartmouth.EDU>
Date: 13 Dec 88 17:54:03 GMT
References: <916@taurus.BITNET>
Sender: news@dartvax.Dartmouth.EDU
Reply-To: earleh@eleazar.dartmouth.edu (Earle R. Horton)
Organization: Thayer School of Engineering
Lines: 39