🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #9941

Re: lattice/MANX bug when compiling large programs

#9941
From: Marco Papa
Date: Sun, 02 Oct 1988 21:47
44 lines
2826 bytes
In article <6439@batcomputer.tn.cornell.edu> riley@tcgould.tn.cornell.edu (Daniel S. Riley) writes:
>In article <12499@oberon.USC.EDU> papa@pollux.usc.edu (Marco Papa) writes:
>>Lattice 4.00 compiles the program OK, but then dies right away in Blink.
>>Blink returns "error 502: Distance for reloc16 > 32768" with symbol __xcovf or
>>something like that.  I am just using the "default" library lc which should
>>be able to address the entire memory.
>
>I don't work for Lattice, SAS or the Software Distillery, but I will offer
>some advice.

Thank you.

>The default for the both the compiler AND THE LIBRARIES is base-relative
>addressing.  For a program with a lot of data, you should be compiling 
>with the -b0 flag to lc (or lc1) to disable base-relative addressing.  You
>probably should not be using the blink "SMALLDATA" option.  If you still
>have the problem, you should use the library lcnb in the lib directory on
>disk 4, which is compiled without base-relative addressing (this is 
>documented in the readme file on disk 1--disk 4 was added after the manual 
>was printed).

As also suggested by Raymond Brand, I used both flags -b0 -r0.  This seems to
let Blick to finish up linking successfully.  According to Raymond and Dave the
default is "base-relative" addressing (obtained with -b1 -r1).

This experiment seems to confirm this. This is also exactly the opposite as 
what is documented in the Lattice Manual:

p. C-9: "the default is to use 32-bit absolute addressing, which allows 
data hunks of virtually unlimited size..." Also the fact that both -b  and -r
allow a numweric operand is not documented anywhere.

The interesting thing is that I got the correct answer and fix from poeple
totally disconnected with Lattice, SAS or the Software Distillery (I don't
mean to flame you guys, you are out of the Blink loop new, I understand),
and instead Lattice Tech support gave me the WRONG answer.

Thank you 'net guys.

-- Marco Papa 'Doc'
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
uucp:...!pollux!papa       BIX:papa       ARPAnet:pollux!papa@oberon.usc.edu
 "There's Alpha, Beta, Gamma and Diga!" -- Leo Schwab [quoting Rick Unland]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID: <12521@oberon.USC.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!rutgers!mailrus!cornell!rochester!bbn!oberon!pollux.usc.edu!papa
References: <12499@oberon.USC.EDU> <6439@batcomputer.tn.cornell.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!rutgers!mailrus!cornell!rochester!bbn!oberon!pollux.usc.edu!papa
From: papa@pollux.usc.edu (Marco Papa)
Newsgroups: comp.sys.amiga.tech
Subject: Re: lattice/MANX bug when compiling large programs
Message-ID: <12521@oberon.USC.EDU>
Date: 2 Oct 88 21:47:12 GMT
References: <12499@oberon.USC.EDU> <6439@batcomputer.tn.cornell.edu>
Sender: news@oberon.USC.EDU
Reply-To: papa@pollux.usc.edu (Marco Papa)
Organization: Felsina Software, Los Angeles, CA
Lines: 44