🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #21455

Moving Code Segments and the Sumacc C compiler

#21455
From: kdmoen
Date: Wed, 11 Nov 1987 03:59
30 lines
1981 bytes
Thanks to all of the wonderful people who have written to tell me
that unloaded code segments can move around in memory while a
Mac application is running.

I would like to clarify one point that might have been lost in the
flurry of followup postings.  In his original article,

David Phillip Oster (oster@dewey.soe.berkeley.edu.UUCP) writes:
>The authors of the compiler seem to be unaware that on a Macintosh
>executable code can move while the program is running. Unlike all Macintosh
>compilers, they generate position _dependent_ code, and have a funky
>loader scheme to resolve non-relocatable references at program load
>time. Eventually, the code moves, and all that position dependent code
>points at never-neverland.
>
>Conclusion:
>Don't use sumacc C. Because of its authors' poor understanding of the
>Macintosh execution time environment, the sumacc C compiler generates
>incorrect code.

This is only true if you are writing desk accessories.
If you are writing an *application*, then the sumacc compiler+rmaker
will create a single segment, which can be arbitrarily large, and
which does not move around during execution.  In other words, it is
perfectly safe to use Sumacc for writing applications.
-- 
Doug Moen
University of Waterloo Computer Graphics Lab
UUCP:     {ihnp4,watmath}!watcgl!kdmoen
INTERNET: kdmoen@cgl.waterloo.edu
Technical Details
Message-ID: <2303@watcgl.waterloo.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!watcgl!kdmoen
References: <7486@dartvax.UUCP> <7508@dartvax.UUCP> <21522@ucbvax.BERKELEY.EDU>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!watcgl!kdmoen
From: kdmoen@watcgl.UUCP
Newsgroups: comp.sys.mac
Subject: Moving Code Segments and the Sumacc C compiler
Message-ID: <2303@watcgl.waterloo.edu>
Date: Tue, 10-Nov-87 22:59:16 EST
Article-I.D.: watcgl.2303
Posted: Tue Nov 10 22:59:16 1987
Date-Received: Fri, 13-Nov-87 04:28:27 EST
References: <7486@dartvax.UUCP> <7508@dartvax.UUCP> <21522@ucbvax.BERKELEY.EDU>
Reply-To: kdmoen@watcgl.waterloo.edu (Doug Moen)
Organization: U. of Waterloo, Ontario
Lines: 30
Keywords: C compiler gripe