Changeset 2824 for trunk


Ignore:
Timestamp:
Oct 21, 2006, 10:04:40 PM (19 years ago)
Author:
bird
Message:

...

Location:
trunk/kLdr
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/kLdr/kLdr.c

    r2821 r2824  
    2525 */
    2626
     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
    2748#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"
    3350
    3451
  • trunk/kLdr/kLdr.h

    r2821 r2824  
    3232#endif
    3333
     34/* kLdr depend on size_t, [u]intNN_t, [u]intptr_t and some related constants. */
    3435#include <sys/types.h>
    3536#include <stdint.h>
     37
    3638
    3739/** A KLDRMOD handle. */
  • trunk/kLdr/kLdrHlp.h

    r2821 r2824  
    2828#ifndef __kLdrHlp_h__
    2929#define __kLdrHlp_h__
     30
     31/** Get the minimum of two values. */
     32#define KLDR_MIN(a, b) ((a) <= (b) ? (a) : (b))
    3033
    3134#ifdef __OS2__
     
    6770#endif
    6871
     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
    6986
    7087#endif /* __kLdrHlp_h__ */
Note: See TracChangeset for help on using the changeset viewer.