Merge pull request #56 from ksherlock/export-gequ

qlinkgs : make GEQU symbols available to the linker
This commit is contained in:
Lane Roathe 2021-04-26 08:57:51 -07:00 committed by GitHub
commit 1d23d8c76d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 48 additions and 8 deletions

View File

@ -2464,7 +2464,7 @@ relocatefinal
sta [tempptr],y
sta omfoff2
lda foundlable+o_labtype
and #linkabsbit
and #linkabsbit.linkgeqbit
jne :clc
lda #$02
sta omfbytes
@ -2549,7 +2549,7 @@ relocatefinal
sta [tempptr],y
lda foundlable+o_labtype
and #linkabsbit
and #linkabsbit.linkgeqbit
jne :clc
bit interseg
@ -2690,7 +2690,7 @@ relocatefinal
sta [tempptr],y
rep $20
lda foundlable+o_labtype
and #linkabsbit ;absolute lable?
and #linkabsbit.linkgeqbit ;absolute lable?
jne :clc
bit interseg
@ -2791,7 +2791,7 @@ relocatefinal
sta [tempptr],y
rep $20
lda foundlable+o_labtype
and #linkabsbit
and #linkabsbit.linkgeqbit
jne :clc
bit interseg
@ -2886,7 +2886,7 @@ relocatefinal
sta [tempptr],y
rep $20
lda foundlable+o_labtype
and #linkabsbit
and #linkabsbit.linkgeqbit
jne :clc
bit interseg
@ -3048,7 +3048,7 @@ relocatefinal
sta [tempptr],y
rep $20
lda foundlable+o_labtype
and #linkabsbit
and #linkabsbit.linkgeqbit
jne :clc
lda #$f5
@ -3103,7 +3103,7 @@ relocatefinal
sta [tempptr],y
lda foundlable+o_labtype
and #linkabsbit
and #linkabsbit.linkgeqbit
jne :clc
lda #$f5
@ -3252,7 +3252,7 @@ getexternal php
ora #linkentused
sta [lableptr],y
:itsfound2 lda foundlable+o_labtype
bit #linkentrybit
bit #linkentrybit.linkgeqbit
jeq :notfound
lda foundlable+o_lablocal ;get lable's seg number
sta extseg

18
testdata/3010-gequ-link.S vendored Normal file
View File

@ -0,0 +1,18 @@
* link file
* link script gequ symbols are visible to both the assembler and linker
*
*
ovr all
* this geq available at asm-time
gequ1 geq 1
equ1 equ 2
asm 3010-gequ.S
* this geq available at link-time
gequ2 geq 3
lnk 3010-gequ.L
sav 3010-gequ
ent

22
testdata/3010-gequ.S vendored Normal file
View File

@ -0,0 +1,22 @@
rel
xc
xc
* ext gequ1
ext gequ2
lda #gequ1
ldy #equ1
ldx #gequ2
rtl
* verify all sizes work
db gequ2
dw gequ2
ddb gequ2
adr gequ2
adrl gequ2
sav 3010-gequ.L
sym