OSLink

C Specification

#include <revolution/os.h>
BOOL OSLink ( OSModuleInfo* newModule, void* bss );

BOOL OSLinkFixed ( OSModuleInfo* newModule, void* bss );

Arguments

newModule Pointer to the module to link.
bss Pointer to the available memory space to use for the bss section (size specified by OSModuleHeader.bssSize).

Return Values

Returns TRUE if the function completes normally.

Description

The OSLink function links the specified module. Even after the module is unlinked, if the module startup code explicitly initializes its data section, the module memory copy can be reused by the OSLink function.

The OSLinkFixed function links the specified module and releases some memory that the relocatable module occupies. Once the module is linked using the OSLinkFixed function and the memory space is specified using fixSize of the OSModuleHeader structure, the memory space can be used for any purpose (for example, bss section). However, the module memory copy can't be reused with the OSLink[Fixed] function even after it is unlinked. When the module is linked, note that the location specified by fixSize is converted into the virtual address from the file offset. 

See Also

Introduction to Relocatable Module System
OSUnlink

Revision History

03/01/2006 Initial version.