kolibrios/programs/develop/libraries/libs_v2/coff.h
pavelyakov befac9b242 source code library
git-svn-id: svn://kolibrios.org@5936 a494cfbc-eb01-0410-851d-a64ba20cac60
2015-11-27 09:20:48 +00:00

45 lines
834 B
C

/*
2015
Author: Pavel Yakovlev.
*/
typedef struct
{
void *name;
void *function;
} export_t;
typedef unsigned long long qword;
typedef unsigned int dword;
typedef unsigned char byte;
typedef unsigned short word;
#define NULL ((void*)0)
#define quotess(name) #name
#ifdef NO_LIBIMPORT_FUNC
#define EXPORT_ export_t EXPORTS[]={
#else
#define EXPORT_ export_t EXPORTS[]={{"lib_pointer_library",&lib_pointer_library},
#endif
#define export(name) {LIB_NAME "." quotess(name),&name},
#define _EXPORT { NULL, NULL }};
#ifndef NO_LIBIMPORT_FUNC
static struct LIBDLL_STRUCT
{
int (*load)(char *path);
dword (*get)(char *name);
};
static inline struct LIBDLL_STRUCT library;
static void lib_pointer_library(dword adr1,dword adr2)
{
library.load = adr1;
library.get = adr2;
}
#endif