Discussion of issues related specifically to writing code for native mode devices. This includes ZBasic code as well as assembly language code and C code, both inline and standalone.
C:/Program Files/ZBasic/zxlib\libzx24n.a(uart.o): In function `__vector_9':
(.text+0x13e): relocation truncated to fit: R_AVR_7_PCREL against `no symbol'
C:/Program Files/ZBasic/zxlib\libzx24n.a(uart.o): In function `__vector_9':
(.text+0x14a): relocation truncated to fit: R_AVR_7_PCREL against `no symbol'
make: *** [ZXOnly.i1] Error 1
Is this just a strange error message referring to an error in my code, or is there something else happening here?
-Don
Edit: Perhaps someone can relocate this to the new forum..
Don_Kirby wrote:Is this just a strange error message referring to an error in my code?
This error comes from the backend process. Presumably, you're using either --keep-files or --verbose or both. Otherwise, all you would have seen is an internal compiler error which is (almost) never caused by an error on your part.
In this particular case, the linker could not resolve a relative jump to a label within the limits inherent to a relative jump. That's what the "out of range" message means, i.e. you can get there from here. The problem was caused by some last minute changes that we made in the ZX library code where we changed some relative call/jump instructions to absolute as they should have been. What's odd about this is that the test suite did not report the same error. I'll have to look into why this was the case.
I've uploaded a new ZX library .zip file with corrected .a files for each device. These should be extracted to the zxlib subdirectory of the ZBasic installation directory.