Commit Graph

4 Commits

Author SHA1 Message Date
Stephen Heumann
8aa3c4e8c7 Give error about excessive alignment at the right time.
The error "Alignment factor must not exceed segment align factor" is now given when an ALIGN record with greater alignment than its segment is encountered. (This is the error that was given erroneously in other circumstances before the last commit.)
2021-03-03 22:53:57 -06:00
Stephen Heumann
76ba56a36b Allow 2-byte RELEXPR records to be used for branches of + or - 64KB.
Previously, the linker gave an error if the relative displacement was more than + or - 32 KB. But 2-byte RELEXPR records are typically used for the operand of the BRL instruction, and since its address calculation wraps around within the program bank, it can effectively address + or - 64KB (i.e. any location within the program bank). Similar reasoning applies to PER, the other instruction using long relative addressing.

This would give an error in code like the following:

bigbrl  start
        brl     later
        ds      33000  ; realistic examples would have actual code here
later   rtl
        end

(This currently also gives an assembler error due to similar logic in ORCA/M, but the output file can be linked anyway.)

This issue can affect very large functions compiled with ORCA/C or ORCA/Pascal, which may sometimes have branches that go more than 32 KB forward or back.
2021-02-19 18:18:47 -06:00
Kelvin Sherlock
c21ae46a4d convert CR files to LF for better git compatibility. 2017-10-02 09:35:05 -04:00
mikew50
748ae356d7 The ORCA Linker 2.0.3 from the Opus ][ CD 2017-10-01 21:26:59 -06:00