Skip to content

Relocatable executables (i.e. TSRs) #90

@thejpster

Description

@thejpster

The -C relocation-model=pie option for rustc will produce an executable where code and data are designed to be in the same region (i.e. RAM) and can be located anywhere provided their relative offsets remain the same.

This means we should be able to load a TSR if it has been compiled as pie. It could occupy the top part of RAM and hook itself into the OS, perhap by replacing one of the OS API functions with itself. This would require the OS API table to be in RAM, but that's plausible - it's not too large and we do have 4K of OS reserved RAM. It would also allow the loading of multiple programs simultaneously (e.g. running a linker during a compilation) without moving the first program out of the way so the second can have access to the usual start address (0x2000_1000).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions