[comp.sys.mac.programmer] MPW Link Error

cruff@ncar.ucar.edu (Craig Ruff) (08/07/89)

I'm trying to link a large application using a large segment.  I get some error
messages from link that says "jump table offset too large (Error 50)".
Not all of the routines in the application show up with these errors.  I set
the C compiler -b option to use PC relative references where possible, and set
the segment size with the -ss option and produced a load map.  The largest
jump table offset listed is $0120(A5), which seems to me to be well within the
allowed range.  What's going on here, is there something link isn't telling me?
-- 
Craig Ruff      	NCAR			cruff@ncar.ucar.edu
(303) 497-1211  	P.O. Box 3000
			Boulder, CO  80307

keith@Apple.COM (Keith Rollin) (08/07/89)

In article <3885@ncar.ucar.edu> cruff@ncar.UCAR.EDU (Craig Ruff) writes:
>I'm trying to link a large application using a large segment.  I get some error
>messages from link that says "jump table offset too large (Error 50)".
>Not all of the routines in the application show up with these errors.  I set
>the C compiler -b option to use PC relative references where possible, and set
>the segment size with the -ss option and produced a load map.  The largest
>jump table offset listed is $0120(A5), which seems to me to be well within the
>allowed range.  What's going on here, is there something link isn't telling me?
>-- 

I guess that error message is a little too obtuse, especially for an error that
occurs all the time. What the Linker is telling you is that the value
it is trying to stuff into $0120(A5) is too large. On the 68000, PC relative
offsets are signed 16 bit quantities. It is these values that go into the
jump table. It seems that your program is of such a composition that you'd
require a value that is out of this range. This occurs if you have any entry
points that are further away than 32K from the start of your CODE segment.
------------------------------------------------------------------------------
Keith Rollin  ---  Apple Computer, Inc.  ---  Developer Technical Support
INTERNET: keith@apple.com
    UUCP: {decwrl, hoptoad, nsc, sun, amdahl}!apple!keith
"Argue for your Apple, and sure enough, it's yours" - Keith Rollin, Contusions