]> Shamusworld >> Repos - rln/commit
Handle absolute BSS segment location of 'xt'
authorJames Jones <atari@theinnocuous.com>
Sun, 17 Apr 2022 04:11:21 +0000 (21:11 -0700)
committerShamus Hammons <jlhamm@acm.org>
Tue, 16 Aug 2022 02:22:44 +0000 (21:22 -0500)
commita0516e2c2a3377dadd28cdd3172b36d921550838
treeaf0cebaee81df85e42db6b1020387121428ac459
parentcc23da7a6e7fd332a0b4ec1e8be7b88cf2187ec1
Handle absolute BSS segment location of 'xt'

When linking an absolute executable, the data
segment and BSS segment can be assigned an
absolute address, or the special value 'x' to
indicate they are contiguous with the prior
segment (text for data, data for BSS). However,
RLN (like MAC) also accepts an optional segment
specifier after the special value 'x' that allows
explicitly specifying which segment the current
one is contiguous with. For data, the only valid
value is 'xt', meaning contiguous with text.
However, when the data segment is specified to
be at an explicit address rather than contiguous
with the text segment, it is valid to specify that
the BSS segment is contiguous with data ('xd') or
with text ('xt'). RLN was accepting these
additional 't' and 'd' values, but ignoring them.

This change causes RLN to correctly place the BSS
segment after the text segment when its location
is specified as 'xt' as long as the data segment
isn't also contiguous with the text segment.
rln.c