Skip to content

Commit

Permalink
Add workaround for -1 offset problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
mysterymath committed May 9, 2022
1 parent 1e38768 commit 255e2a9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mos-platform/atari8/link.ld
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ OUTPUT_FORMAT {
SHORT(_start)
/* Address where first byte of main segment should be loaded. */
SHORT(0x2000)
/* Address of last byte of main segment. */
SHORT(__data_end - 1)
/* Address of last byte of main segment.
-- is a hack to force the early evalutation of __data_end; otherwise the
-1 offset may be interpreted as requesting the end of the containing
section. */
SHORT(--__data_end - 1)

TRIM(ram)
}

0 comments on commit 255e2a9

Please sign in to comment.