A method of preparing an executable program from a plurality of object
code modules, at least one of said object code modules including section
data specifying a plurality of functions associated with relocation
instructions, at least some of which functions are called in the
executable program. The method comprises the steps of assigning an
attribute to each function, said attribute being capable of providing an
indication of whether the function is reachable, reading the section data
and relocation instructions to ascertain if the function is called and
setting the attribute to indicate the called status and preparing the
executable program to only include functions with an indicated called
status of reachable. A linker is provided for preparing the executable
program from object code modules containing the relocation instructions.
A computer program is provided to control the linker.