-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy patharchitectures.py
76 lines (69 loc) · 1.22 KB
/
architectures.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/env python
import logging
l = logging.getLogger("puppeteer.architectures")
# pylint: disable=no-init
class x86:
bits = 32
bytes = 4
sp_name = 'esp'
ip_name = 'eip'
bp_name = 'ebp'
endness = '<'
struct_char = "I"
struct_fmt = '<I'
python_fmt = "%08x"
page_size = 0x1000
gas="x86-as"
objcopy="x86-objcopy"
class amd64:
bits = 64
bytes = 8
sp_name = 'rsp'
ip_name = 'rip'
bp_name = 'rbp'
endness = '<'
struct_char = "Q"
struct_fmt = '<Q'
python_fmt = "%16x"
page_size = 0x1000
gas="x86_64-as"
objcopy="x86_64-objcopy"
class arm:
bits = 32
bytes = 4
sp_name = 'r13'
ip_name = 'r15'
bp_name = 'something'
endness = '<'
struct_char = "I"
struct_fmt = '<I'
python_fmt = "%08x"
page_size = 0x1000
gas="arm-as"
objcopy="arm-objcopy"
class ppc:
bits = 32
bytes = 4
sp_name = 'something'
ip_name = 'something'
bp_name = 'something'
endness = '>'
struct_char = "I"
struct_fmt = '>I'
python_fmt = "%08x"
page_size = 0x1000
gas="ppc-as"
objcopy="ppc-objcopy"
class mips:
bits = 32
bytes = 4
sp_name = 'something'
ip_name = 'something'
bp_name = 'something'
endness = '>'
struct_char = "I"
struct_fmt = '>I'
python_fmt = "%08x"
page_size = 0x1000
gas="ppc-as"
objcopy="ppc-objcopy"