1 //          Copyright Yazan Dabain 2014.
2 // Distributed under the Boost Software License, Version 1.0.
3 //    (See accompanying file LICENSE_1_0.txt or copy at
4 //          http://www.boost.org/LICENSE_1_0.txt)
5 
6 module elf.low32;
7 import elf.low;
8 
9 package:
10 
11 alias ELF32_Addr = uint;
12 alias ELF32_Off = uint;
13 alias ELF32_Half = ushort;
14 alias ELF32_Word = uint;
15 alias ELF32_SWord = int;
16 
17 alias ELF32_Section = ushort;
18 
19 align(1) struct ELFHeader32L {
20 align(1):
21 	ELFIdent ident;
22 	ELF32_Half type;
23 	ELF32_Half machine;
24 	ELF32_Word version_;
25 	ELF32_Addr entry;
26 	ELF32_Off phoff;
27 	ELF32_Off shoff;
28 	ELF32_Word flags;
29 	ELF32_Half ehsize;
30 	ELF32_Half phentsize;
31 	ELF32_Half phnum;
32 	ELF32_Half shentsize;
33 	ELF32_Half shnum;
34 	ELF32_Half shstrndx;
35 }
36 
37 align(1) struct ELFSection32L {
38 align(1):
39 	ELF32_Word name;
40 	ELF32_Word type;
41 	ELF32_Word flags;
42 	ELF32_Addr address;
43 	ELF32_Off offset;
44 	ELF32_Word size;
45 	ELF32_Word link;
46 	ELF32_Word info;
47 	ELF32_Word addralign;
48 	ELF32_Word entsize;
49 }
50 
51 align(1) struct ELFSymbol32L {
52 align(1):
53 	ELF32_Word name;
54 	ELF32_Addr value;
55 	ELF32_Word size;
56 	ubyte info;
57 	ubyte other;
58 	ELF32_Section shndx;
59 }