caug-tom@pro-charlotte.cts.com (Tom McKeel) (12/31/87)
I have recently been working on a C program to get the directory on any disk drive. Well, I used an example which was originally compiled with Manx 3.2a. When I try to compile this program after making some minor changes I got a strange linking error which I do not understand. The program compiled without and warnings or errors. During the 2ND pass of the linker(BLINK 7.2) I got this error: Error 504: UNKNOWN symbol - Distance for Data Reloc16 > 32768 First Reference in unit mydir.o at offset 00000010 in file 'ram:mydir.o' To Unit mydir.o at offset 00000010 in file 'ram:mydir.o' This occured if I used my own WITH file during the linking process or I let the lc program link for me using the -L option. If anyone could give me a clue to how I can figure out what the error is (and what it means) or just tell me how to solve my problem. Any help would be great. Thanks in advance, Tom
nj@ndmath.UUCP (nj @ a loss) (01/01/88)
In article <2232@crash.cts.com>, caug-tom@pro-charlotte.cts.com (Tom McKeel) writes: > I have recently been working on a C program to get the directory on any disk > drive. Well, I used an example which was originally compiled with Manx 3.2a. > When I try to compile this program after making some minor changes I got a > strange linking error which I do not understand. The program compiled without > and warnings or errors. During the 2ND pass of the linker(BLINK 7.2) I got > this error: > > Error 504: UNKNOWN symbol - Distance for Data Reloc16 > 32768 > First Reference in unit mydir.o at offset 00000010 in file 'ram:mydir.o' > To Unit mydir.o at offset 00000010 in file 'ram:mydir.o' > This sounds like the same problem I had for awhile until I called Lattice. Contrary to what the manual says at first, it automatically turns on base- and pc-relative addressing. Try turning either or both off with -b0 and -r0, and it should link properly. This was just a documentation error that got overlooked. nj