File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ let doc_template = {|
55
55
(declare bits (size int ))
56
56
(declare base- address (addr int ))
57
57
(declare entry- point (addr int ))
58
+ (declare is- little- endian (flag bool ))
58
59
(declare mapped (addr int ) (size int ) (off int ))
59
60
(declare code- region (addr int ) (size int ) (off int ))
60
61
(declare named- region (addr int ) (size int ) (name str))
@@ -66,6 +67,7 @@ let doc_template = {|
66
67
(bits $ bits)
67
68
(base- address $ base)
68
69
(entry- point $ entry)
70
+ (is- little- endian $ endian)
69
71
(mapped $ base $ length $ offset)
70
72
(code- region $ base $ length $ offset)
71
73
(named- region $ base $ length code)
@@ -80,6 +82,10 @@ let register_loader ctxt =
80
82
" arch" , (ctxt--> arch);
81
83
" offset" , Int64. to_string @@ ctxt--> offset;
82
84
" base" , Bitvec. to_string @@ ctxt--> base_address;
85
+ " endian" , Bool. to_string begin match Arch. of_string (ctxt--> arch) with
86
+ | None -> true
87
+ | Some arch -> Poly. equal (Arch. endian arch) LittleEndian
88
+ end ;
83
89
" bits" , Int. to_string @@ begin
84
90
match Arch. of_string (ctxt--> arch) with
85
91
| None -> ctxt--> bits
You can’t perform that action at this time.
0 commit comments