Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1051 tullio 1
////////////////////////////////////////////////////////////////////////
2
//      dynalink.h
3
//
4
//  DynaLink for S.H.A.R.K
5
//  Dynamic ELF object linker.
6
//  
7
//  Original code written by Luca Abeni.
8
//  Adapted by Lex Nahumury 19-7-2006.
9
//  
10
//  This is free software; see GPL.txt
11
//////////////////////////////////////////////////////////////////////// 
12
#ifndef _DYNALINK_H_
13
#define _DYNALINK_H_
14
 
15
#define MAX_DYNA_MOD    64
16
 
17
struct mods_struct
18
{
19
  void *mod_start;
20
  void *mod_end;
21
  char *string;
22
  DWORD reserved;
23
};
24
 
25
 
26
struct app_module_info
27
{
28
        unsigned int start;             // the memory used goes from bytes 'mod_start'
29
        unsigned int end;               // to 'mod_end-1' inclusive
30
        unsigned int size;              // size in bytes
31
        unsigned int dyn_entry; // main_module_entry() start address
32
        char* name;                             // file name
33
};
34
 
35
struct dat_module_info
36
{
37
        unsigned int start;             // the memory used goes from bytes 'mod_start'
38
        unsigned int end;               // to 'mod_end-1' inclusive.
39
        unsigned int size;              // in bytes
40
        char *name;                             // file name
41
};
42
 
43
struct dynalink_module_list
44
{
45
        int num_apps;                                                           // number of loaded ELF objects
46
        int num_dats;                                                           // number of loaded Data object
47
        struct app_module_info  app[MAX_DYNA_MOD];      // aplications in mem
48
        struct dat_module_info  dat[MAX_DYNA_MOD];      // data file in mem
49
};
50
 
51
 
52
int dynalink_modules(   struct multiboot_info* mb,
53
                                                struct dynalink_module_list* dml,
54
                                                char* search_string);
55
 
56
 
57
 
58
#endif //_DYNALINK_H_
59
 
60
 
61