OSLink

Syntax

#include <revolution/os.h>

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

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

Arguments

newModule Pointer to the module to be linked.
bss Pointer to the available memory space used for the bss section (size given by OSModuleHeader.bssSize).

Return Values

Returns TRUE for normal termination.

Description

OSLink links the specified module. The memory copy of the module can be reused with OSLink even after the module is unlinked if the module startup code initializes its data section explicitly.

OSLinkFixed links the specified module and releases some memory occupied by the relocatable module. Once the module is linked with OSLinkFixed, the later memory space specified by fixSize of the OSModuleHeader structure can be used for any purpose (for example, for the bss section). The memory copy of the module, however, cannot be reused with OSLink[Fixed] even after it is unlinked. Be aware that the position specified by fixSize is converted to a virtual address from a file offset when the module is linked.

See Also

Relocatable Module System, OSUnlink

Revision History

2006/03/01 Initial version.


CONFIDENTIAL