Runtime Link Library System

RLL USER GUIDE


Contents


Overview

The RLL User Guide section is concerned with what the application programmer has to do to make use of the RLL system. It looks at the system from the perspective of a C application programmer, but similar considerations would apply to using the RLL system from any other compiled language that has RLL support implemented for it.

The first point to make is that from the perspective of the C application programmer, no complicated tricks have to be used to make use of a RLL library that has been provided by someone else. You write your program just as you would normally. The only differences are:


RLL and the Pre-Processor

There are no explicit changes to the Pre-Processor to support the RLL system.

Having said that, many of the standard system include files need the pre-processor symbol RLL_LIBS defined if you want to use RLL versions of standard library routines. This can be specified by using the command line option

-DRLLLIBS to the Pre-processor.

In practise one normally does this indirectly by passing an appropriate command line option to the CC front-end program as discussed later.


RLL and the Linker

To use the RLL system you need LD v2.0 or later. The LDLD linker is supplied as part of the C68 C ompilation system for QDOS, although it is quite capable of being used independently of the C68 system.

When you are using RLL libraries the linker needs to be told that you are using such libraries. This is done vy using command line options of the form

-r??? where ??? specifies the name of the RLL library to be used. The LD linker will automatically add the letters lib to the start, and _rll to the end in a manner that is analogous to use of the -l parameter when linking without using RLLs. Thus a command line option of
-rm would cause LD to use the library LIBM_RLL which is the RLL equivalent of the LIBM_A library.

In practise one normally does this indirectly by passing an appropriate command line option to the CC front-end program as discussed later.


RLL and the CC Front-End

To simplify it even further for the user, the CC front-end program will recognise the -DRLL_LIBS option to the pre-processor or any -r??? option to the linker, and automatically generate the instructions to the LD linker that tell it to use the LIBC_RLL library (which is the RLL equivalent to the standard C library LIBC_A). This is very akin to the way that the LIBC_A library is included by default for standard user programs that are statically linked to not use RLLs.

Not all routines that are available in the standard C68 libraries have equivalents in the RLL versions of the same libraries. Therefore to play safe, you should include both the RLL and standard variants of the libraries. The RLL version should precede the standard version of any library. The LD linker will then select the RLL versions of the routines where they exist, and the standard ones where they do not.

The corollary to this is that use of the RLL system is ALWAYS optional. If you want to use RLL libraries, then you explicitly tell the system to produce a version of your program that is to make use of RLL libraries. If you do not do this, the default action will be to produce a version of the program that has all the necessary libraries routine statically linked in so that the resultant program can be run independently of the RLL system.

As an example, if you were going to build a program that needed routines from both the maths libraries and the standard C library you would used parameters of the form:

-rm -lm -rc This would search LIBM_RLL, the RLL version of the maths library, to pull in whatever routines it could from there. It would then search LIBM_A, the standard version of the maths library, to pull in any maths routines that had no RLL equivalents. Following that it would search LIBC_RLL, the RLL version of the standard C library to pull in RLL versions of that type of routines. Finally it would search LIBC_A, the standard version of the C library. You could omit the -rc parameter from the above if you are using the CC front-end and have used the _DRLL_LIBS option as CC will then would automatically search the standard C libraries - searching the RLL version before the non-RLL version when building a RLL enabled program.


RLL RunTime Requirements

It is worth emphasising that once a program has been linked to use the RLL system, there are number of components that will need to be present at runtime for it to work correctly. These are:

If all these conditions are satisfied then the RLL system will function in a completely transparent manner, and the user will be unaware of its presence.