Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!mcnc!unc!steele From: steele@unc.cs.unc.edu (Oliver Steele) Newsgroups: comp.sys.mac Subject: Re: What is wrong with the Sumacc C compiler Message-ID: <1960@unc.cs.unc.edu> Date: Mon, 9-Nov-87 18:46:02 EST Article-I.D.: unc.1960 Posted: Mon Nov 9 18:46:02 1987 Date-Received: Wed, 11-Nov-87 21:24:12 EST References: <7486@dartvax.UUCP> <7508@dartvax.UUCP> <21522@ucbvax.BERKELEY.EDU> <2283@watcgl.waterloo.edu> Reply-To: steele@unc.UUCP (Oliver Steele) Organization: University of North Carolina, Chapel Hill Lines: 29 Keywords: C compiler gripe kdmoen@watcgl.waterloo.edu (Doug Moen) writes: >oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) writes: >...concerning why the sumacc compiler is no good... >>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. > >Sorry, but this sounds blatantly impossible. Take a look at UnloadSeg(). >If the code were to move >while the program is running, then *all of the return addresses and >function pointers on the stack would become invalid* and the program >would crash, regardless of what compiler was used to create the program. That's why it's dangerous to call UnloadSeg() on segments that have live routines. The Sumacc compiler just makes it dangerous to call it on segments that have ever been used, as well. ------------------------------------------------------------------------------ Oliver Steele ...!{decvax,ihnp4}!mcnc!unc!steele steele%unc@mcnc.org "When you believe in a loving God, life appears to be very funny." -- Garrison Keillor