- Timestamp:
- Oct 21, 2006, 10:04:40 PM (19 years ago)
- Location:
- trunk/kLdr
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kLdr/kLdr.c
r2821 r2824 25 25 */ 26 26 27 /** @pg pg_kLdr kLdr - The Dynamic Loader 28 * 29 * The purpose of kLdr is to provide a generic interface for querying 30 * information about and loading executable image modules. 31 * 32 * kLdr defines the term executable image to include all kinds of files that contains 33 * binary code that can be executed on a CPU - linker objects (OBJs/Os), shared 34 * objects (SOs), dynamic link libraries (DLLs), executables (EXEs), and all kinds 35 * of kernel modules / device drivers (SYSs). 36 * 37 * kLdr provides two types of services: 38 * -# Inspect or/and load individual modules (kLdrMod). 39 * -# Work as a dynamic loader - construct and maintain an address space (kLdrDy). 40 * 41 * The kLdrMod API works on KLDRMOD structures where all the internals are exposed, while 42 * the kLdrDy API works opque KLDRDY structures. KLDRDY are in reality simple wrappers 43 * around KLDRMOD with some extra linking and attributes. 44 * 45 */ 46 47 27 48 #include "kLdr.h" 28 29 /** memcpy */ 30 #define kLdrMemCopy(a,b,c) __builtin_memcpy(a,b,c) 31 /** Get the minimum of two values. */ 32 #define KLDR_MIN(a, b) ((a) <= (b) ? (a) : (b)) 49 #include "kLdrHlp.h" 33 50 34 51 -
trunk/kLdr/kLdr.h
r2821 r2824 32 32 #endif 33 33 34 /* kLdr depend on size_t, [u]intNN_t, [u]intptr_t and some related constants. */ 34 35 #include <sys/types.h> 35 36 #include <stdint.h> 37 36 38 37 39 /** A KLDRMOD handle. */ -
trunk/kLdr/kLdrHlp.h
r2821 r2824 28 28 #ifndef __kLdrHlp_h__ 29 29 #define __kLdrHlp_h__ 30 31 /** Get the minimum of two values. */ 32 #define KLDR_MIN(a, b) ((a) <= (b) ? (a) : (b)) 30 33 31 34 #ifdef __OS2__ … … 67 70 #endif 68 71 72 /* 73 * Compiler specific helpers. 74 * (I.e. operations that tend to have compiler intrinsic implementations). 75 */ 76 #ifdef __GNUC__ 77 /** memcpy */ 78 # define kLdrMemCopy(a,b,c) __builtin_memcpy(a,b,c) 79 /** memset */ 80 # define kLdrMemSet(a,b,c) __builtin_memset(a,b,c) 81 #endif 82 83 #ifndef kLdrMemCopy 84 # error "Needs porting to your compiler." 85 #endif 69 86 70 87 #endif /* __kLdrHlp_h__ */
Note:
See TracChangeset
for help on using the changeset viewer.