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
/* ELF support for BFD.
1
/* ELF support for BFD.
2
   Copyright 1991, 1992, 1993, 1995, 1997, 1998, 1999, 2001, 2003, 2005,
-
 
3
   2008, 2010 Free Software Foundation, Inc.
2
   Copyright (C) 1991-2015 Free Software Foundation, Inc.
4
 
3
 
5
   Written by Fred Fish @ Cygnus Support, from information published
4
   Written by Fred Fish @ Cygnus Support, from information published
6
   in "UNIX System V Release 4, Programmers Guide: ANSI C and
5
   in "UNIX System V Release 4, Programmers Guide: ANSI C and
7
   Programming Support Tools".
6
   Programming Support Tools".
8
 
7
 
9
   This file is part of BFD, the Binary File Descriptor library.
8
   This file is part of BFD, the Binary File Descriptor library.
10
 
9
 
11
   This program is free software; you can redistribute it and/or modify
10
   This program is free software; you can redistribute it and/or modify
12
   it under the terms of the GNU General Public License as published by
11
   it under the terms of the GNU General Public License as published by
13
   the Free Software Foundation; either version 3 of the License, or
12
   the Free Software Foundation; either version 3 of the License, or
14
   (at your option) any later version.
13
   (at your option) any later version.
15
 
14
 
16
   This program is distributed in the hope that it will be useful,
15
   This program is distributed in the hope that it will be useful,
17
   but WITHOUT ANY WARRANTY; without even the implied warranty of
16
   but WITHOUT ANY WARRANTY; without even the implied warranty of
18
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
   GNU General Public License for more details.
18
   GNU General Public License for more details.
20
 
19
 
21
   You should have received a copy of the GNU General Public License
20
   You should have received a copy of the GNU General Public License
22
   along with this program; if not, write to the Free Software
21
   along with this program; if not, write to the Free Software
23
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
22
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
24
   MA 02110-1301, USA.  */
23
   MA 02110-1301, USA.  */
25
 
24
 
26
/* This file is part of ELF support for BFD, and contains the portions
25
/* This file is part of ELF support for BFD, and contains the portions
27
   that describe how ELF is represented externally by the BFD library.
26
   that describe how ELF is represented externally by the BFD library.
28
   I.E. it describes the in-file representation of ELF.  It requires
27
   I.E. it describes the in-file representation of ELF.  It requires
29
   the elf/common.h file which contains the portions that are common to
28
   the elf/common.h file which contains the portions that are common to
30
   both the internal and external representations.  */
29
   both the internal and external representations.  */
31
 
30
 
32
/* The 64-bit stuff is kind of random.  Perhaps someone will publish a
31
/* The 64-bit stuff is kind of random.  Perhaps someone will publish a
33
   spec someday.  */
32
   spec someday.  */
34
 
33
 
35
#ifndef _ELF_EXTERNAL_H
34
#ifndef _ELF_EXTERNAL_H
36
#define _ELF_EXTERNAL_H
35
#define _ELF_EXTERNAL_H
37
 
36
 
38
/* Special section indices, which may show up in st_shndx fields, among
37
/* Special section indices, which may show up in st_shndx fields, among
39
   other places.  */
38
   other places.  */
40
 
39
 
41
#define SHN_LORESERVE	0xFF00		/* Begin range of reserved indices */
40
#define SHN_LORESERVE	0xFF00		/* Begin range of reserved indices */
42
#define SHN_LOPROC	0xFF00		/* Begin range of appl-specific */
41
#define SHN_LOPROC	0xFF00		/* Begin range of appl-specific */
43
#define SHN_HIPROC	0xFF1F		/* End range of appl-specific */
42
#define SHN_HIPROC	0xFF1F		/* End range of appl-specific */
44
#define SHN_LOOS	0xFF20		/* OS specific semantics, lo */
43
#define SHN_LOOS	0xFF20		/* OS specific semantics, lo */
45
#define SHN_HIOS	0xFF3F		/* OS specific semantics, hi */
44
#define SHN_HIOS	0xFF3F		/* OS specific semantics, hi */
46
#define SHN_ABS		0xFFF1		/* Associated symbol is absolute */
45
#define SHN_ABS		0xFFF1		/* Associated symbol is absolute */
47
#define SHN_COMMON	0xFFF2		/* Associated symbol is in common */
46
#define SHN_COMMON	0xFFF2		/* Associated symbol is in common */
48
#define SHN_XINDEX	0xFFFF		/* Section index is held elsewhere */
47
#define SHN_XINDEX	0xFFFF		/* Section index is held elsewhere */
49
#define SHN_HIRESERVE	0xFFFF		/* End range of reserved indices */
48
#define SHN_HIRESERVE	0xFFFF		/* End range of reserved indices */
50
 
49
 
51
/* ELF Header (32-bit implementations) */
50
/* ELF Header (32-bit implementations) */
52
 
51
 
53
typedef struct {
52
typedef struct {
54
  unsigned char	e_ident[16];		/* ELF "magic number" */
53
  unsigned char	e_ident[16];		/* ELF "magic number" */
55
  unsigned char	e_type[2];		/* Identifies object file type */
54
  unsigned char	e_type[2];		/* Identifies object file type */
56
  unsigned char	e_machine[2];		/* Specifies required architecture */
55
  unsigned char	e_machine[2];		/* Specifies required architecture */
57
  unsigned char	e_version[4];		/* Identifies object file version */
56
  unsigned char	e_version[4];		/* Identifies object file version */
58
  unsigned char	e_entry[4];		/* Entry point virtual address */
57
  unsigned char	e_entry[4];		/* Entry point virtual address */
59
  unsigned char	e_phoff[4];		/* Program header table file offset */
58
  unsigned char	e_phoff[4];		/* Program header table file offset */
60
  unsigned char	e_shoff[4];		/* Section header table file offset */
59
  unsigned char	e_shoff[4];		/* Section header table file offset */
61
  unsigned char	e_flags[4];		/* Processor-specific flags */
60
  unsigned char	e_flags[4];		/* Processor-specific flags */
62
  unsigned char	e_ehsize[2];		/* ELF header size in bytes */
61
  unsigned char	e_ehsize[2];		/* ELF header size in bytes */
63
  unsigned char	e_phentsize[2];		/* Program header table entry size */
62
  unsigned char	e_phentsize[2];		/* Program header table entry size */
64
  unsigned char	e_phnum[2];		/* Program header table entry count */
63
  unsigned char	e_phnum[2];		/* Program header table entry count */
65
  unsigned char	e_shentsize[2];		/* Section header table entry size */
64
  unsigned char	e_shentsize[2];		/* Section header table entry size */
66
  unsigned char	e_shnum[2];		/* Section header table entry count */
65
  unsigned char	e_shnum[2];		/* Section header table entry count */
67
  unsigned char	e_shstrndx[2];		/* Section header string table index */
66
  unsigned char	e_shstrndx[2];		/* Section header string table index */
68
} Elf32_External_Ehdr;
67
} Elf32_External_Ehdr;
69
 
68
 
70
typedef struct {
69
typedef struct {
71
  unsigned char	e_ident[16];		/* ELF "magic number" */
70
  unsigned char	e_ident[16];		/* ELF "magic number" */
72
  unsigned char	e_type[2];		/* Identifies object file type */
71
  unsigned char	e_type[2];		/* Identifies object file type */
73
  unsigned char	e_machine[2];		/* Specifies required architecture */
72
  unsigned char	e_machine[2];		/* Specifies required architecture */
74
  unsigned char	e_version[4];		/* Identifies object file version */
73
  unsigned char	e_version[4];		/* Identifies object file version */
75
  unsigned char	e_entry[8];		/* Entry point virtual address */
74
  unsigned char	e_entry[8];		/* Entry point virtual address */
76
  unsigned char	e_phoff[8];		/* Program header table file offset */
75
  unsigned char	e_phoff[8];		/* Program header table file offset */
77
  unsigned char	e_shoff[8];		/* Section header table file offset */
76
  unsigned char	e_shoff[8];		/* Section header table file offset */
78
  unsigned char	e_flags[4];		/* Processor-specific flags */
77
  unsigned char	e_flags[4];		/* Processor-specific flags */
79
  unsigned char	e_ehsize[2];		/* ELF header size in bytes */
78
  unsigned char	e_ehsize[2];		/* ELF header size in bytes */
80
  unsigned char	e_phentsize[2];		/* Program header table entry size */
79
  unsigned char	e_phentsize[2];		/* Program header table entry size */
81
  unsigned char	e_phnum[2];		/* Program header table entry count */
80
  unsigned char	e_phnum[2];		/* Program header table entry count */
82
  unsigned char	e_shentsize[2];		/* Section header table entry size */
81
  unsigned char	e_shentsize[2];		/* Section header table entry size */
83
  unsigned char	e_shnum[2];		/* Section header table entry count */
82
  unsigned char	e_shnum[2];		/* Section header table entry count */
84
  unsigned char	e_shstrndx[2];		/* Section header string table index */
83
  unsigned char	e_shstrndx[2];		/* Section header string table index */
85
} Elf64_External_Ehdr;
84
} Elf64_External_Ehdr;
86
 
85
 
87
/* Program header */
86
/* Program header */
88
 
87
 
89
typedef struct {
88
typedef struct {
90
  unsigned char	p_type[4];		/* Identifies program segment type */
89
  unsigned char	p_type[4];		/* Identifies program segment type */
91
  unsigned char	p_offset[4];		/* Segment file offset */
90
  unsigned char	p_offset[4];		/* Segment file offset */
92
  unsigned char	p_vaddr[4];		/* Segment virtual address */
91
  unsigned char	p_vaddr[4];		/* Segment virtual address */
93
  unsigned char	p_paddr[4];		/* Segment physical address */
92
  unsigned char	p_paddr[4];		/* Segment physical address */
94
  unsigned char	p_filesz[4];		/* Segment size in file */
93
  unsigned char	p_filesz[4];		/* Segment size in file */
95
  unsigned char	p_memsz[4];		/* Segment size in memory */
94
  unsigned char	p_memsz[4];		/* Segment size in memory */
96
  unsigned char	p_flags[4];		/* Segment flags */
95
  unsigned char	p_flags[4];		/* Segment flags */
97
  unsigned char	p_align[4];		/* Segment alignment, file & memory */
96
  unsigned char	p_align[4];		/* Segment alignment, file & memory */
98
} Elf32_External_Phdr;
97
} Elf32_External_Phdr;
99
 
98
 
100
typedef struct {
99
typedef struct {
101
  unsigned char	p_type[4];		/* Identifies program segment type */
100
  unsigned char	p_type[4];		/* Identifies program segment type */
102
  unsigned char	p_flags[4];		/* Segment flags */
101
  unsigned char	p_flags[4];		/* Segment flags */
103
  unsigned char	p_offset[8];		/* Segment file offset */
102
  unsigned char	p_offset[8];		/* Segment file offset */
104
  unsigned char	p_vaddr[8];		/* Segment virtual address */
103
  unsigned char	p_vaddr[8];		/* Segment virtual address */
105
  unsigned char	p_paddr[8];		/* Segment physical address */
104
  unsigned char	p_paddr[8];		/* Segment physical address */
106
  unsigned char	p_filesz[8];		/* Segment size in file */
105
  unsigned char	p_filesz[8];		/* Segment size in file */
107
  unsigned char	p_memsz[8];		/* Segment size in memory */
106
  unsigned char	p_memsz[8];		/* Segment size in memory */
108
  unsigned char	p_align[8];		/* Segment alignment, file & memory */
107
  unsigned char	p_align[8];		/* Segment alignment, file & memory */
109
} Elf64_External_Phdr;
108
} Elf64_External_Phdr;
110
 
109
 
111
/* Section header */
110
/* Section header */
112
 
111
 
113
typedef struct {
112
typedef struct {
114
  unsigned char	sh_name[4];		/* Section name, index in string tbl */
113
  unsigned char	sh_name[4];		/* Section name, index in string tbl */
115
  unsigned char	sh_type[4];		/* Type of section */
114
  unsigned char	sh_type[4];		/* Type of section */
116
  unsigned char	sh_flags[4];		/* Miscellaneous section attributes */
115
  unsigned char	sh_flags[4];		/* Miscellaneous section attributes */
117
  unsigned char	sh_addr[4];		/* Section virtual addr at execution */
116
  unsigned char	sh_addr[4];		/* Section virtual addr at execution */
118
  unsigned char	sh_offset[4];		/* Section file offset */
117
  unsigned char	sh_offset[4];		/* Section file offset */
119
  unsigned char	sh_size[4];		/* Size of section in bytes */
118
  unsigned char	sh_size[4];		/* Size of section in bytes */
120
  unsigned char	sh_link[4];		/* Index of another section */
119
  unsigned char	sh_link[4];		/* Index of another section */
121
  unsigned char	sh_info[4];		/* Additional section information */
120
  unsigned char	sh_info[4];		/* Additional section information */
122
  unsigned char	sh_addralign[4];	/* Section alignment */
121
  unsigned char	sh_addralign[4];	/* Section alignment */
123
  unsigned char	sh_entsize[4];		/* Entry size if section holds table */
122
  unsigned char	sh_entsize[4];		/* Entry size if section holds table */
124
} Elf32_External_Shdr;
123
} Elf32_External_Shdr;
125
 
124
 
126
typedef struct {
125
typedef struct {
127
  unsigned char	sh_name[4];		/* Section name, index in string tbl */
126
  unsigned char	sh_name[4];		/* Section name, index in string tbl */
128
  unsigned char	sh_type[4];		/* Type of section */
127
  unsigned char	sh_type[4];		/* Type of section */
129
  unsigned char	sh_flags[8];		/* Miscellaneous section attributes */
128
  unsigned char	sh_flags[8];		/* Miscellaneous section attributes */
130
  unsigned char	sh_addr[8];		/* Section virtual addr at execution */
129
  unsigned char	sh_addr[8];		/* Section virtual addr at execution */
131
  unsigned char	sh_offset[8];		/* Section file offset */
130
  unsigned char	sh_offset[8];		/* Section file offset */
132
  unsigned char	sh_size[8];		/* Size of section in bytes */
131
  unsigned char	sh_size[8];		/* Size of section in bytes */
133
  unsigned char	sh_link[4];		/* Index of another section */
132
  unsigned char	sh_link[4];		/* Index of another section */
134
  unsigned char	sh_info[4];		/* Additional section information */
133
  unsigned char	sh_info[4];		/* Additional section information */
135
  unsigned char	sh_addralign[8];	/* Section alignment */
134
  unsigned char	sh_addralign[8];	/* Section alignment */
136
  unsigned char	sh_entsize[8];		/* Entry size if section holds table */
135
  unsigned char	sh_entsize[8];		/* Entry size if section holds table */
137
} Elf64_External_Shdr;
136
} Elf64_External_Shdr;
-
 
137
 
-
 
138
/* Compression header */
-
 
139
 
-
 
140
typedef struct {
-
 
141
  unsigned char	ch_type[4];		/* Type of compression */
-
 
142
  unsigned char	ch_size[4];		/* Size of uncompressed data in bytes */
-
 
143
  unsigned char	ch_addralign[4];	/* Alignment of uncompressed data  */
-
 
144
} Elf32_External_Chdr;
-
 
145
 
-
 
146
typedef struct {
-
 
147
  unsigned char	ch_type[4];		/* Type of compression */
-
 
148
  unsigned char	ch_reserved[4];		/* Padding */
-
 
149
  unsigned char	ch_size[8];		/* Size of uncompressed data in bytes */
-
 
150
  unsigned char	ch_addralign[8];	/* Alignment of uncompressed data  */
-
 
151
} Elf64_External_Chdr;
138
 
152
 
139
/* Symbol table entry */
153
/* Symbol table entry */
140
 
154
 
141
typedef struct {
155
typedef struct {
142
  unsigned char	st_name[4];		/* Symbol name, index in string tbl */
156
  unsigned char	st_name[4];		/* Symbol name, index in string tbl */
143
  unsigned char	st_value[4];		/* Value of the symbol */
157
  unsigned char	st_value[4];		/* Value of the symbol */
144
  unsigned char	st_size[4];		/* Associated symbol size */
158
  unsigned char	st_size[4];		/* Associated symbol size */
145
  unsigned char	st_info[1];		/* Type and binding attributes */
159
  unsigned char	st_info[1];		/* Type and binding attributes */
146
  unsigned char	st_other[1];		/* No defined meaning, 0 */
160
  unsigned char	st_other[1];		/* No defined meaning, 0 */
147
  unsigned char	st_shndx[2];		/* Associated section index */
161
  unsigned char	st_shndx[2];		/* Associated section index */
148
} Elf32_External_Sym;
162
} Elf32_External_Sym;
149
 
163
 
150
typedef struct {
164
typedef struct {
151
  unsigned char	st_name[4];		/* Symbol name, index in string tbl */
165
  unsigned char	st_name[4];		/* Symbol name, index in string tbl */
152
  unsigned char	st_info[1];		/* Type and binding attributes */
166
  unsigned char	st_info[1];		/* Type and binding attributes */
153
  unsigned char	st_other[1];		/* No defined meaning, 0 */
167
  unsigned char	st_other[1];		/* No defined meaning, 0 */
154
  unsigned char	st_shndx[2];		/* Associated section index */
168
  unsigned char	st_shndx[2];		/* Associated section index */
155
  unsigned char	st_value[8];		/* Value of the symbol */
169
  unsigned char	st_value[8];		/* Value of the symbol */
156
  unsigned char	st_size[8];		/* Associated symbol size */
170
  unsigned char	st_size[8];		/* Associated symbol size */
157
} Elf64_External_Sym;
171
} Elf64_External_Sym;
158
 
172
 
159
typedef struct {
173
typedef struct {
160
  unsigned char est_shndx[4];		/* Section index */
174
  unsigned char est_shndx[4];		/* Section index */
161
} Elf_External_Sym_Shndx;
175
} Elf_External_Sym_Shndx;
162
 
176
 
163
/* Note segments */
177
/* Note segments */
164
 
178
 
165
typedef struct {
179
typedef struct {
166
  unsigned char	namesz[4];		/* Size of entry's owner string */
180
  unsigned char	namesz[4];		/* Size of entry's owner string */
167
  unsigned char	descsz[4];		/* Size of the note descriptor */
181
  unsigned char	descsz[4];		/* Size of the note descriptor */
168
  unsigned char	type[4];		/* Interpretation of the descriptor */
182
  unsigned char	type[4];		/* Interpretation of the descriptor */
169
  char		name[1];		/* Start of the name+desc data */
183
  char		name[1];		/* Start of the name+desc data */
170
} Elf_External_Note;
184
} Elf_External_Note;
171
 
185
 
172
/* Relocation Entries */
186
/* Relocation Entries */
173
typedef struct {
187
typedef struct {
174
  unsigned char r_offset[4];	/* Location at which to apply the action */
188
  unsigned char r_offset[4];	/* Location at which to apply the action */
175
  unsigned char	r_info[4];	/* index and type of relocation */
189
  unsigned char	r_info[4];	/* index and type of relocation */
176
} Elf32_External_Rel;
190
} Elf32_External_Rel;
177
 
191
 
178
typedef struct {
192
typedef struct {
179
  unsigned char r_offset[4];	/* Location at which to apply the action */
193
  unsigned char r_offset[4];	/* Location at which to apply the action */
180
  unsigned char	r_info[4];	/* index and type of relocation */
194
  unsigned char	r_info[4];	/* index and type of relocation */
181
  unsigned char	r_addend[4];	/* Constant addend used to compute value */
195
  unsigned char	r_addend[4];	/* Constant addend used to compute value */
182
} Elf32_External_Rela;
196
} Elf32_External_Rela;
183
 
197
 
184
typedef struct {
198
typedef struct {
185
  unsigned char r_offset[8];	/* Location at which to apply the action */
199
  unsigned char r_offset[8];	/* Location at which to apply the action */
186
  unsigned char	r_info[8];	/* index and type of relocation */
200
  unsigned char	r_info[8];	/* index and type of relocation */
187
} Elf64_External_Rel;
201
} Elf64_External_Rel;
188
 
202
 
189
typedef struct {
203
typedef struct {
190
  unsigned char r_offset[8];	/* Location at which to apply the action */
204
  unsigned char r_offset[8];	/* Location at which to apply the action */
191
  unsigned char	r_info[8];	/* index and type of relocation */
205
  unsigned char	r_info[8];	/* index and type of relocation */
192
  unsigned char	r_addend[8];	/* Constant addend used to compute value */
206
  unsigned char	r_addend[8];	/* Constant addend used to compute value */
193
} Elf64_External_Rela;
207
} Elf64_External_Rela;
194
 
208
 
195
/* dynamic section structure */
209
/* dynamic section structure */
196
 
210
 
197
typedef struct {
211
typedef struct {
198
  unsigned char	d_tag[4];		/* entry tag value */
212
  unsigned char	d_tag[4];		/* entry tag value */
199
  union {
213
  union {
200
    unsigned char	d_val[4];
214
    unsigned char	d_val[4];
201
    unsigned char	d_ptr[4];
215
    unsigned char	d_ptr[4];
202
  } d_un;
216
  } d_un;
203
} Elf32_External_Dyn;
217
} Elf32_External_Dyn;
204
 
218
 
205
typedef struct {
219
typedef struct {
206
  unsigned char	d_tag[8];		/* entry tag value */
220
  unsigned char	d_tag[8];		/* entry tag value */
207
  union {
221
  union {
208
    unsigned char	d_val[8];
222
    unsigned char	d_val[8];
209
    unsigned char	d_ptr[8];
223
    unsigned char	d_ptr[8];
210
  } d_un;
224
  } d_un;
211
} Elf64_External_Dyn;
225
} Elf64_External_Dyn;
212
 
226
 
213
/* The version structures are currently size independent.  They are
227
/* The version structures are currently size independent.  They are
214
   named without a 32 or 64.  If that ever changes, these structures
228
   named without a 32 or 64.  If that ever changes, these structures
215
   will need to be renamed.  */
229
   will need to be renamed.  */
216
 
230
 
217
/* This structure appears in a SHT_GNU_verdef section.  */
231
/* This structure appears in a SHT_GNU_verdef section.  */
218
 
232
 
219
typedef struct {
233
typedef struct {
220
  unsigned char		vd_version[2];
234
  unsigned char		vd_version[2];
221
  unsigned char		vd_flags[2];
235
  unsigned char		vd_flags[2];
222
  unsigned char		vd_ndx[2];
236
  unsigned char		vd_ndx[2];
223
  unsigned char		vd_cnt[2];
237
  unsigned char		vd_cnt[2];
224
  unsigned char		vd_hash[4];
238
  unsigned char		vd_hash[4];
225
  unsigned char		vd_aux[4];
239
  unsigned char		vd_aux[4];
226
  unsigned char		vd_next[4];
240
  unsigned char		vd_next[4];
227
} Elf_External_Verdef;
241
} Elf_External_Verdef;
228
 
242
 
229
/* This structure appears in a SHT_GNU_verdef section.  */
243
/* This structure appears in a SHT_GNU_verdef section.  */
230
 
244
 
231
typedef struct {
245
typedef struct {
232
  unsigned char		vda_name[4];
246
  unsigned char		vda_name[4];
233
  unsigned char		vda_next[4];
247
  unsigned char		vda_next[4];
234
} Elf_External_Verdaux;
248
} Elf_External_Verdaux;
235
 
249
 
236
/* This structure appears in a SHT_GNU_verneed section.  */
250
/* This structure appears in a SHT_GNU_verneed section.  */
237
 
251
 
238
typedef struct {
252
typedef struct {
239
  unsigned char		vn_version[2];
253
  unsigned char		vn_version[2];
240
  unsigned char		vn_cnt[2];
254
  unsigned char		vn_cnt[2];
241
  unsigned char		vn_file[4];
255
  unsigned char		vn_file[4];
242
  unsigned char		vn_aux[4];
256
  unsigned char		vn_aux[4];
243
  unsigned char		vn_next[4];
257
  unsigned char		vn_next[4];
244
} Elf_External_Verneed;
258
} Elf_External_Verneed;
245
 
259
 
246
/* This structure appears in a SHT_GNU_verneed section.  */
260
/* This structure appears in a SHT_GNU_verneed section.  */
247
 
261
 
248
typedef struct {
262
typedef struct {
249
  unsigned char		vna_hash[4];
263
  unsigned char		vna_hash[4];
250
  unsigned char		vna_flags[2];
264
  unsigned char		vna_flags[2];
251
  unsigned char		vna_other[2];
265
  unsigned char		vna_other[2];
252
  unsigned char		vna_name[4];
266
  unsigned char		vna_name[4];
253
  unsigned char		vna_next[4];
267
  unsigned char		vna_next[4];
254
} Elf_External_Vernaux;
268
} Elf_External_Vernaux;
255
 
269
 
256
/* This structure appears in a SHT_GNU_versym section.  This is not a
270
/* This structure appears in a SHT_GNU_versym section.  This is not a
257
   standard ELF structure; ELF just uses Elf32_Half.  */
271
   standard ELF structure; ELF just uses Elf32_Half.  */
258
 
272
 
259
typedef struct {
273
typedef struct {
260
  unsigned char		vs_vers[2];
274
  unsigned char		vs_vers[2];
261
} ATTRIBUTE_PACKED  Elf_External_Versym;
275
} ATTRIBUTE_PACKED  Elf_External_Versym;
262
 
276
 
263
/* Structure for syminfo section.  */
277
/* Structure for syminfo section.  */
264
typedef struct
278
typedef struct
265
{
279
{
266
  unsigned char		si_boundto[2];
280
  unsigned char		si_boundto[2];
267
  unsigned char		si_flags[2];
281
  unsigned char		si_flags[2];
268
} Elf_External_Syminfo;
282
} Elf_External_Syminfo;
269
 
283
 
270
 
284
 
271
/* This structure appears on the stack and in NT_AUXV core file notes.  */
285
/* This structure appears on the stack and in NT_AUXV core file notes.  */
272
typedef struct
286
typedef struct
273
{
287
{
274
  unsigned char		a_type[4];
288
  unsigned char		a_type[4];
275
  unsigned char		a_val[4];
289
  unsigned char		a_val[4];
276
} Elf32_External_Auxv;
290
} Elf32_External_Auxv;
277
 
291
 
278
typedef struct
292
typedef struct
279
{
293
{
280
  unsigned char		a_type[8];
294
  unsigned char		a_type[8];
281
  unsigned char		a_val[8];
295
  unsigned char		a_val[8];
282
} Elf64_External_Auxv;
296
} Elf64_External_Auxv;
283
 
297
 
284
/* Size of SHT_GROUP section entry.  */
298
/* Size of SHT_GROUP section entry.  */
285
 
299
 
286
#define GRP_ENTRY_SIZE		4
300
#define GRP_ENTRY_SIZE		4
287
 
301
 
288
#endif /* _ELF_EXTERNAL_H */
302
#endif /* _ELF_EXTERNAL_H */