~ubuntu-branches/ubuntu/vivid/gcl/vivid

« back to all changes in this revision

Viewing changes to h/minglacks.h

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2002-03-04 14:29:59 UTC
  • Revision ID: james.westby@ubuntu.com-20020304142959-dey14w08kr7lldu3
Tags: upstream-2.5.0.cvs20020219
ImportĀ upstreamĀ versionĀ 2.5.0.cvs20020219

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
 
 
3
#define SYMNMLEN 8
 
4
struct syment 
 
5
{
 
6
  union {
 
7
    char n_name[SYMNMLEN];
 
8
    struct {
 
9
      int n_zeroes;
 
10
      int n_offset;
 
11
    } n;
 
12
  } n;
 
13
  DWORD n_value;
 
14
  SHORT n_scnum;
 
15
  WORD n_type;
 
16
  BYTE n_sclass;
 
17
  BYTE n_numaux;
 
18
};
 
19
 
 
20
#define n_zeroes n.n.n_zeroes
 
21
#define n_offset n.n.n_offset
 
22
#define n_name n.n_name
 
23
/* storage class */
 
24
#define C_EXT             0x0002 /* IMAGE_SYM_CLASS_EXTERNAL */
 
25
/* section number */
 
26
#define N_UNDEF           (SHORT)0  /* Symbol is undefined or is common. */
 
27
 
 
28
 
 
29
 
 
30
 
 
31
 
 
32
struct filehdr {
 
33
  WORD f_magic; /* magic number                 */
 
34
  WORD f_nscns; /* number of sections           */
 
35
  DWORD f_timdat;       /* time & date stamp            */
 
36
  DWORD f_symptr;       /* file pointer to symtab       */
 
37
  DWORD f_nsyms;        /* number of symtab entries     */
 
38
  WORD f_opthdr;        /* sizeof(optional hdr)         */
 
39
  WORD f_flags; /* flags                        */
 
40
};
 
41
 
 
42
 
 
43
 
 
44
#define IMAGE_SIZEOF_SHORT_NAME              8
 
45
struct scnhdr {
 
46
  BYTE  s_name[IMAGE_SIZEOF_SHORT_NAME];
 
47
  /* section name  */
 
48
  DWORD     s_paddr;    /* physical address, aliased s_nlib */
 
49
  DWORD         s_vaddr;        /* virtual address              */
 
50
  DWORD         s_size; /* section size                 */
 
51
  DWORD         s_scnptr;       /* file ptr to raw data for section */
 
52
  DWORD         s_relptr;       /* file ptr to relocation       */
 
53
  DWORD         s_lnnoptr;      /* file ptr to line numbers     */
 
54
  WORD          s_nreloc;       /* number of relocation entries */
 
55
  WORD          s_nlnno;        /* number of line number entries*/
 
56
  DWORD         s_flags;        /* flags                        */
 
57
};
 
58
 
 
59
 
 
60
 
 
61
 
 
62
 
 
63
/* IMAGE_REL_I386_ABSOLUTE */
 
64
#define R_ABS         0x0000 /* absolute, no relocation is necessary */
 
65
/* IMAGE_REL_I386_DIR32 */
 
66
#define   R_DIR32  0x0006  /* Direct 32-bit reference to the symbols virtual address */
 
67
/* IMAGE_REL_I386_REL32 */
 
68
#define R_PCRLONG 0x0014  /* 32-bit reference pc relative  to the symbols virtual address */
 
69
 
 
70
 
 
71
 
 
72
/* _IMAGE_RELOCATION */
 
73
struct reloc {
 
74
  union {
 
75
        DWORD   r_vaddr;
 
76
        DWORD   r_count;    /* Set to the real count
 
77
                               when IMAGE_SCN_LNK_NRELOC_OVFL is set */
 
78
    } r;
 
79
    DWORD   r_symndx;
 
80
    WORD    r_type;
 
81
};
 
82
#define r_vaddr r.r_vaddr