include/binary.h File Reference


Detailed Description

Binary Loader Definitions.

Author:
John Hodge (thePowersGang)

Go to the source code of this file.

Data Structures

struct  tBinaryPage
 Representation of a page in a binary file. More...
struct  tBinary
 Defines a binary file. More...
struct  tBinaryType
 Binary type definition. More...

Defines

Binary Page Flags
#define BIN_PAGEFLAG_RO   0x0001
 Read-only.
#define BIN_PAGEFLAG_EXEC   0x0002
 Executable.

Functions

char * Binary_RegInterp (char *Path)
 Registers an interpreter path with the binary loader.
int Binary_RegisterType (tBinaryType *Type)
 Registers a binary type with the kernel's loader.

Function Documentation

char* Binary_RegInterp ( char *  Path  ) 

Registers an interpreter path with the binary loader.

Parameters:
Path Path to the requested interpreter (need not be a "true" path)
Returns:
Pointer to the cached string

Speeds up checking if the intepreter is loaded in the kernel by allowing the search to use pointer comparisons instead of string comparisons.

int Binary_RegisterType ( tBinaryType Type  ) 

Registers a binary type with the kernel's loader.

Parameters:
Type Pointer to the loader's type structure
Returns:
Boolean success
Note:
The structure Type must be persistant (usually it will be a constant global variable)

This function tells the binary loader about a new file type, and gives it the functions to read the type into a tBinary structure, relocate it and to find the value of symbols defined within the binary.

Generated on Mon Feb 14 15:21:30 2011 for Acess2 by  doxygen 1.6.3