Subversion Repositories Kolibri OS

Rev

Rev 5191 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5191 Rev 6324
1
/* Alpha VMS external format of Extended Image Section Descriptor.
1
/* Alpha VMS external format of Extended Image Section Descriptor.
2
 
2
 
3
   Copyright 2010 Free Software Foundation, Inc.
3
   Copyright (C) 2010-2015 Free Software Foundation, Inc.
4
   Written by Tristan Gingold , AdaCore.
4
   Written by Tristan Gingold , AdaCore.
5
 
5
 
6
   This file is part of BFD, the Binary File Descriptor library.
6
   This file is part of BFD, the Binary File Descriptor library.
7
 
7
 
8
   This program is free software; you can redistribute it and/or modify
8
   This program is free software; you can redistribute it and/or modify
9
   it under the terms of the GNU General Public License as published by
9
   it under the terms of the GNU General Public License as published by
10
   the Free Software Foundation; either version 3 of the License, or
10
   the Free Software Foundation; either version 3 of the License, or
11
   (at your option) any later version.
11
   (at your option) any later version.
12
 
12
 
13
   This program is distributed in the hope that it will be useful,
13
   This program is distributed in the hope that it will be useful,
14
   but WITHOUT ANY WARRANTY; without even the implied warranty of
14
   but WITHOUT ANY WARRANTY; without even the implied warranty of
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
   GNU General Public License for more details.
16
   GNU General Public License for more details.
17
 
17
 
18
   You should have received a copy of the GNU General Public License
18
   You should have received a copy of the GNU General Public License
19
   along with this program; if not, write to the Free Software
19
   along with this program; if not, write to the Free Software
20
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
20
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21
   MA 02110-1301, USA.  */
21
   MA 02110-1301, USA.  */
22
 
22
 
23
#ifndef _VMS_EISD_H
23
#ifndef _VMS_EISD_H
24
#define _VMS_EISD_H
24
#define _VMS_EISD_H
25
 
25
 
26
/* Flags.  */
26
/* Flags.  */
27
#define EISD__M_GBL		0x0001	/* Global.  */
27
#define EISD__M_GBL		0x0001	/* Global.  */
28
#define EISD__M_CRF		0x0002	/* Copy on reference.  */
28
#define EISD__M_CRF		0x0002	/* Copy on reference.  */
29
#define EISD__M_DZRO		0x0004	/* Demand zero page.  */
29
#define EISD__M_DZRO		0x0004	/* Demand zero page.  */
30
#define EISD__M_WRT		0x0008	/* Writable.  */
30
#define EISD__M_WRT		0x0008	/* Writable.  */
31
#define EISD__M_INITALCODE	0x0010	/* Part of initialization code.  */
31
#define EISD__M_INITALCODE	0x0010	/* Part of initialization code.  */
32
#define EISD__M_BASED		0x0020	/* Isect is based.  */
32
#define EISD__M_BASED		0x0020	/* Isect is based.  */
33
#define EISD__M_FIXUPVEC	0x0040	/* Isect is fixup section.  */
33
#define EISD__M_FIXUPVEC	0x0040	/* Isect is fixup section.  */
34
#define EISD__M_RESIDENT	0x0080	/* Isect is memory resident.  */
34
#define EISD__M_RESIDENT	0x0080	/* Isect is memory resident.  */
35
#define EISD__M_VECTOR		0x0100	/* Vector contained in isect.  */
35
#define EISD__M_VECTOR		0x0100	/* Vector contained in isect.  */
36
#define EISD__M_PROTECT		0x0200	/* Isect is protected.  */
36
#define EISD__M_PROTECT		0x0200	/* Isect is protected.  */
37
#define EISD__M_LASTCLU		0x0400	/* Last cluster.  */
37
#define EISD__M_LASTCLU		0x0400	/* Last cluster.  */
38
#define EISD__M_EXE		0x0800	/* Code isect.  */
38
#define EISD__M_EXE		0x0800	/* Code isect.  */
39
#define EISD__M_NONSHRADR	0x1000	/* Contains non-shareable data.  */
39
#define EISD__M_NONSHRADR	0x1000	/* Contains non-shareable data.  */
40
#define EISD__M_QUAD_LENGTH	0x2000	/* Quad length field valid.  */
40
#define EISD__M_QUAD_LENGTH	0x2000	/* Quad length field valid.  */
41
#define EISD__M_ALLOC_64BIT	0x4000	/* Allocate 64-bit space.  */
41
#define EISD__M_ALLOC_64BIT	0x4000	/* Allocate 64-bit space.  */
42
 
42
 
43
#define EISD__K_LEN 36
43
#define EISD__K_LEN 36
44
#define EISD__K_LENEND 12	/* For end marker or next block.  */
44
#define EISD__K_LENEND 12	/* For end marker or next block.  */
45
#define EISD__K_MAXLENGLBL 84
45
#define EISD__K_MAXLENGLBL 84
46
 
46
 
47
#define EISD__K_GBLNAMLEN 44	/* Size of the field.  */
47
#define EISD__K_GBLNAMLEN 44	/* Size of the field.  */
48
 
48
 
49
struct vms_eisd
49
struct vms_eisd
50
{
50
{
51
  unsigned char majorid[4];
51
  unsigned char majorid[4];
52
  unsigned char minorid[4];
52
  unsigned char minorid[4];
53
 
53
 
54
  /* Size (in bytes) of this eisd.  */
54
  /* Size (in bytes) of this eisd.  */
55
  unsigned char eisdsize[4];
55
  unsigned char eisdsize[4];
56
 
56
 
57
  /* Size (in bytes) of the section.  */
57
  /* Size (in bytes) of the section.  */
58
  unsigned char secsize[4];
58
  unsigned char secsize[4];
59
 
59
 
60
  /* Virtual address of the section.  */
60
  /* Virtual address of the section.  */
61
  unsigned char virt_addr[8];
61
  unsigned char virt_addr[8];
62
 
62
 
63
  /* Flags.  */
63
  /* Flags.  */
64
  unsigned char flags[4];
64
  unsigned char flags[4];
65
 
65
 
66
  /* Base virtual block number.  */
66
  /* Base virtual block number.  */
67
  unsigned char vbn[4];
67
  unsigned char vbn[4];
68
 
68
 
69
  /* Page fault cluster.  */
69
  /* Page fault cluster.  */
70
  unsigned char pfc;
70
  unsigned char pfc;
71
 
71
 
72
  /* Linker match control.  */
72
  /* Linker match control.  */
73
  unsigned char matchctl;
73
  unsigned char matchctl;
74
 
74
 
75
  /* Section type.  */
75
  /* Section type.  */
76
  unsigned char type;
76
  unsigned char type;
77
 
77
 
78
  unsigned char fill_1;
78
  unsigned char fill_1;
79
 
79
 
80
  /* End of structure for normal records.  */
80
  /* End of structure for normal records.  */
81
 
81
 
82
  /* Ident for global section.  */
82
  /* Ident for global section.  */
83
  unsigned char ident[4];
83
  unsigned char ident[4];
84
      
84
      
85
  /* Global name ascic.  First 8 bytes are quad length field.  */
85
  /* Global name ascic.  First 8 bytes are quad length field.  */
86
  unsigned char gblnam[EISD__K_GBLNAMLEN];
86
  unsigned char gblnam[EISD__K_GBLNAMLEN];
87
};
87
};
88
 
88
 
89
/* Versions.  */
89
/* Versions.  */
90
#define EISD__K_MAJORID 1
90
#define EISD__K_MAJORID 1
91
#define EISD__K_MINORID 1
91
#define EISD__K_MINORID 1
92
 
92
 
93
/* Match control.  */
93
/* Match control.  */
94
#define EISD__K_MATALL 0	/* Match always.  */
94
#define EISD__K_MATALL 0	/* Match always.  */
95
#define EISD__K_MATEQU 1	/* Match if equal.  */
95
#define EISD__K_MATEQU 1	/* Match if equal.  */
96
#define EISD__K_MATLEQ 2	/* Match if less or equal.  */
96
#define EISD__K_MATLEQ 2	/* Match if less or equal.  */
97
#define EISD__K_MATNEV 3	/* Match never.  */
97
#define EISD__K_MATNEV 3	/* Match never.  */
98
 
98
 
99
/* Section type.  */
99
/* Section type.  */
100
#define EISD__K_NORMAL 0	/* Normal program image section.  */
100
#define EISD__K_NORMAL 0	/* Normal program image section.  */
101
#define EISD__K_SHRFXD 1	/* Shareable fixed section.  */
101
#define EISD__K_SHRFXD 1	/* Shareable fixed section.  */
102
#define EISD__K_PRVFXD 2	/* Private fixed section.  */
102
#define EISD__K_PRVFXD 2	/* Private fixed section.  */
103
#define EISD__K_SHRPIC 3	/* Shareable pic section.  */
103
#define EISD__K_SHRPIC 3	/* Shareable pic section.  */
104
#define EISD__K_PRVPIC 4	/* Private PIC section.  */
104
#define EISD__K_PRVPIC 4	/* Private PIC section.  */
105
#define EISD__K_USRSTACK 253	/* User stack section.  */
105
#define EISD__K_USRSTACK 253	/* User stack section.  */
106
 
106
 
107
/* EISD offsets.  */
107
/* EISD offsets.  */
108
 
108
 
109
#define EISD__L_EISDSIZE	 8
109
#define EISD__L_EISDSIZE	 8
110
#define EISD__L_SECSIZE		12
110
#define EISD__L_SECSIZE		12
111
#define EISD__Q_VIR_ADDR	16
111
#define EISD__Q_VIR_ADDR	16
112
#define EISD__L_FLAGS		24
112
#define EISD__L_FLAGS		24
113
#define EISD__L_VBN		28
113
#define EISD__L_VBN		28
114
#define EISD__R_CONTROL		32
114
#define EISD__R_CONTROL		32
115
#define EISD__L_IDENT		36
115
#define EISD__L_IDENT		36
116
#define EISD__T_GBLNAM		40
116
#define EISD__T_GBLNAM		40
117
 
117
 
118
#endif /* _VMS_EISD_H */
118
#endif /* _VMS_EISD_H */