Commit Graph

11 Commits

Author SHA1 Message Date
Stephen Heumann
da13b94a43 Properly evaluate non-constant expressions in EQU/GEQU records.
Previously, the values of such expressions were essentially ignored, resulting in incorrect output.

This affected code like the following example:

test1   start
        lda     >p
        rtl
        end

D1      data
p       gequ    val
        end

val     data
        dc      i'123'
        end

Note that the EQU/GEQU expression is evaluated within the context of the location that references it, not the location where it is defined. This affects the value of the location counter, as well as the symbol search behavior. The references for the OMF format do not clearly define which way this should be done, but the current behavior can cause problems with certain object files produced by ORCA/M.
2022-09-25 21:42:20 -05:00
Stephen Heumann
0b275e5b22 Set position-independent flag only if it is set in all object segments.
Previously, the position-independent attribute bit would be set in a load segment if it was set on the first constituent object segment. Now it is only set in the load segment if it is set in all the constituent object segments. This is consistent with the ORCA linker's general approach of conservatively combining the flags from the object segments.
2022-08-30 19:46:22 -05:00
Stephen Heumann
085c7c46ca Add support for auto-segmentation.
This is a new feature where the linker will automatically divide the code into load segments, creating as many segments as necessary to fit it. This relieves the programmer from the need to manually figure out how a large program can be divided into segments.

Auto-segmentation is triggered by the use of the special load segment name AUTOSEG~~~. Using this approach (rather than a flag in the OMF header) allows auto-segmentation to be used with all existing languages that provide a mechanism for specifying load segment names.
2022-08-30 19:32:09 -05:00
Stephen Heumann
390fd96ede Do not report an error when the segment length equals the bank size.
This is legal per the OMF definition in the GS/OS Reference (and it is accepted by the loader), so it should not be treated as an error.
2021-08-26 22:21:44 -05:00
Stephen Heumann
ea3550bfcc Update release notes. 2021-03-03 23:35:07 -06:00
Stephen Heumann
aa9a585d19 Do not give spurious errors about segment alignment.
This would happen if a later object segment had a more restrictive alignment than previous object segments that contribute to the same load segment, as in the following example:

s1      start
        jsl s2
        rtl
        end

        align   256
s2      start
        rtl
        end

These alignment requirements can be satisfied by just giving the load segment the most restrictive alignment of any object segment (since all alignments are powers of 2) and inserting space as necessary to align the code from each object segment.
2021-03-03 18:41:45 -06:00
Stephen Heumann
d62fdba4bb Update linker release notes. 2021-02-25 22:31:29 -06:00
Stephen Heumann
42734c7433 Update linker release notes. 2018-09-15 16:40:45 -05:00
Stephen Heumann
346516654c Update linker release notes. 2017-10-21 22:29:39 -05: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