RMLinker (rmlink) is a linker that produces soft-loadable (RAM-based) relocatable mixed-mode (C and ARM assembler) modules for use on RISC OS platforms. It is designed to work with a different, more efficient and cleaner APCS variant than the standard used for most relocatable modules on RISC OS, and avoids the ugliness of storing state information at the lowest addresses of the SVC mode stack.
The obvious downside is that it is not possible to use the SharedCLibrary, but there are other technical reasons that it is impossible for Aemulor to use the SharedCLibrary and that project is the primary reason that RMLinker was created, although it is also employed to build other modules such as Geminus.
Each of the above projects employs a mixture of C and handwritten ARM assembler code, employing an APCS-3 variant with the following properties:
This means that for each of the Norcroft tools (CC and ObjAsm), the command-line switch '-apcs 3/32bit/nofp/noswst' shall be used; rmlink will reject object files built using other settings.
The linking process and symbol resolution is essentially the same as that performed by the link that forms part of the Acorn/ROOL Desktop Development Environment, with the key difference being the way that relocations are handled, and specifically the handling of Read/Write data areas. The switch '-RMF' accepted by link instructs it to build a relocatable module but this the generated code will copy the Read/Write data from the module image into workspace when the module is initialised; if, as with Aemulor, this
Copyright © Adrian Lees 2015