Skip to content

Commit dcd6a2a

Browse files
authored
Because absolute addresses aren't relocated, make sure that the source address (#112)
for the initialised zero page isn't absolute --- LOADADDR() returns absolute addresses. Co-authored-by: dg <dg>
1 parent adafbc0 commit dcd6a2a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mos-platform/cpm65/link.ld

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ SECTIONS {
4646
*(.zp.data .zp.data.*)
4747
*(.zp.rodata .zp.rodata.*)
4848
} >zp AT>ram :init
49-
INCLUDE zp-data-symbols.ld
49+
__zp_data_load_start = ADDR(.text) +
50+
(LOADADDR(.zp.data) - LOADADDR(.text));
51+
__zp_data_size = SIZEOF(.zp.data);
5052

5153
.pblock (NOLOAD) : {
5254
_pblock = .;

0 commit comments

Comments
 (0)