KallistiOS
2.0.0
Main Page
Modules
Data Structures
Files
File List
Globals
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
include
kos
exports.h
Go to the documentation of this file.
1
/* KallistiOS 2.0.0
2
3
kos/exports.h
4
Copyright (C)2003 Dan Potter
5
6
*/
7
8
/** \file kos/exports.h
9
\brief Kernel exported symbols support.
10
11
This file contains support related to dynamic linking of the kernel of KOS.
12
The kernel (at compile time) produces a list of exported symbols, which can
13
be looked through using the funtionality in this file.
14
15
\author Dan Potter
16
*/
17
18
#ifndef __KOS_EXPORTS_H
19
#define __KOS_EXPORTS_H
20
21
#include <sys/cdefs.h>
22
__BEGIN_DECLS
23
24
#include <
arch/types.h
>
25
26
/** \brief A single export symbol.
27
28
This structure holds a single symbol that has been exported from the kernel.
29
These will be patched into loaded ELF binaries at load time.
30
31
\headerfile kos/exports.h
32
*/
33
typedef
struct
export_sym
{
34
const
char
*
name
;
/**< \brief The name of the symbol. */
35
ptr_t
ptr
;
/**< \brief A pointer to the symbol. */
36
}
export_sym_t
;
37
38
/** \cond */
39
/* These are the platform-independent exports */
40
extern
export_sym_t
kernel_symtab[];
41
42
/* And these are the arch-specific exports */
43
extern
export_sym_t
arch_symtab[];
44
/** \endcond */
45
46
#ifndef __EXPORTS_FILE
47
#include <
kos/nmmgr.h
>
48
49
/** \brief A symbol table "handler" for nmmgr.
50
\headerfile kos/exports.h
51
*/
52
typedef
struct
symtab_handler
{
53
struct
nmmgr_handler
nmmgr
;
/**< \brief Name manager handler header */
54
export_sym_t
*
table
;
/**< \brief Location of the first entry */
55
}
symtab_handler_t
;
56
#endif
57
58
/** \brief Setup initial kernel exports.
59
\retval 0 On success
60
\retval -1 On error
61
*/
62
int
export_init
();
63
64
/** \brief Look up a symbol by name.
65
\param name The symbol to look up
66
\return The export structure, or NULL on failure
67
*/
68
export_sym_t
*
export_lookup
(
const
char
* name);
69
70
__END_DECLS
71
72
#endif
/* __KOS_EXPORTS_H */
73
Generated by
1.8.1.1