Subversion Repositories HelenOS-historic

Rev

Rev 1702 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1702 Rev 1780
Line 191... Line 191...
191
 *
191
 *
192
 * These types are found to be identical in both 32-bit and 64-bit
192
 * These types are found to be identical in both 32-bit and 64-bit
193
 * ELF object file specifications. They are the only types used
193
 * ELF object file specifications. They are the only types used
194
 * in ELF header.
194
 * in ELF header.
195
 */
195
 */
196
typedef __u64 elf_xword;
196
typedef uint64_t elf_xword;
197
typedef __s64 elf_sxword;
197
typedef int64_t elf_sxword;
198
typedef __u32 elf_word;
198
typedef uint32_t elf_word;
199
typedef __s32 elf_sword;
199
typedef int32_t elf_sword;
200
typedef __u16 elf_half;
200
typedef uint16_t elf_half;
201
 
201
 
202
/**
202
/**
203
 * 32-bit ELF data types.
203
 * 32-bit ELF data types.
204
 *
204
 *
205
 * These types are specific for 32-bit format.
205
 * These types are specific for 32-bit format.
206
 */
206
 */
207
typedef __u32 elf32_addr;
207
typedef uint32_t elf32_addr;
208
typedef __u32 elf32_off;
208
typedef uint32_t elf32_off;
209
 
209
 
210
/**
210
/**
211
 * 64-bit ELF data types.
211
 * 64-bit ELF data types.
212
 *
212
 *
213
 * These types are specific for 64-bit format.
213
 * These types are specific for 64-bit format.
214
 */
214
 */
215
typedef __u64 elf64_addr;
215
typedef uint64_t elf64_addr;
216
typedef __u64 elf64_off;
216
typedef uint64_t elf64_off;
217
 
217
 
218
/** ELF header */
218
/** ELF header */
219
struct elf32_header {
219
struct elf32_header {
220
    __u8 e_ident[EI_NIDENT];
220
    uint8_t e_ident[EI_NIDENT];
221
    elf_half e_type;
221
    elf_half e_type;
222
    elf_half e_machine;
222
    elf_half e_machine;
223
    elf_word e_version;
223
    elf_word e_version;
224
    elf32_addr e_entry;
224
    elf32_addr e_entry;
225
    elf32_off e_phoff;
225
    elf32_off e_phoff;
Line 231... Line 231...
231
    elf_half e_shentsize;
231
    elf_half e_shentsize;
232
    elf_half e_shnum;
232
    elf_half e_shnum;
233
    elf_half e_shstrndx;
233
    elf_half e_shstrndx;
234
};
234
};
235
struct elf64_header {
235
struct elf64_header {
236
    __u8 e_ident[EI_NIDENT];
236
    uint8_t e_ident[EI_NIDENT];
237
    elf_half e_type;
237
    elf_half e_type;
238
    elf_half e_machine;
238
    elf_half e_machine;
239
    elf_word e_version;
239
    elf_word e_version;
240
    elf64_addr e_entry;
240
    elf64_addr e_entry;
241
    elf64_off e_phoff;
241
    elf64_off e_phoff;
Line 307... Line 307...
307
 */
307
 */
308
struct elf32_symbol {
308
struct elf32_symbol {
309
    elf_word st_name;
309
    elf_word st_name;
310
    elf32_addr st_value;
310
    elf32_addr st_value;
311
    elf_word st_size;
311
    elf_word st_size;
312
    __u8 st_info;
312
    uint8_t st_info;
313
    __u8 st_other;
313
    uint8_t st_other;
314
    elf_half st_shndx;
314
    elf_half st_shndx;
315
};
315
};
316
struct elf64_symbol {
316
struct elf64_symbol {
317
    elf_word st_name;
317
    elf_word st_name;
318
    __u8 st_info;
318
    uint8_t st_info;
319
    __u8 st_other;
319
    uint8_t st_other;
320
    elf_half st_shndx;
320
    elf_half st_shndx;
321
    elf64_addr st_value;
321
    elf64_addr st_value;
322
    elf_xword st_size;
322
    elf_xword st_size;
323
};
323
};
324
 
324