Bug 197 - Handle absolute BSS segment location of 'xt'
Summary: Handle absolute BSS segment location of 'xt'
Status: RESOLVED FIXED
Alias: None
Product: RLN
Classification: Unclassified
Component: Core (show other bugs)
Version: unspecified
Hardware: PC All
: Normal normal
Assignee: Shamus Hammons
URL:
Depends on:
Blocks:
 
Reported: 2022-04-16 23:24 CDT by James Jones
Modified: 2022-08-15 21:25 CDT (History)
1 user (show)

See Also:


Attachments
Patch to correct handling of BSS segment location 'xt' (3.40 KB, application/octet-stream)
2022-04-16 23:24 CDT, James Jones
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Jones 2022-04-16 23:24:15 CDT
Created attachment 169 [details]
Patch to correct handling of BSS segment location '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 is accepting these additional 't' and 'd' values, but ignoring them.

The attached patch 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.
Comment 1 Shamus Hammons 2022-08-15 21:25:57 CDT
Thanks for the patch!  :-)