summaryrefslogtreecommitdiff
path: root/lib/ocaml_rts/elf_loader.ml
diff options
context:
space:
mode:
authorThomas Bauereiss2017-09-29 16:33:55 +0100
committerThomas Bauereiss2017-09-29 16:33:55 +0100
commitd24027629670f9ecd67cf107a988df242c42ed19 (patch)
tree367a79b1e6fec48a8e1dfb81770c0c7d3360d0de /lib/ocaml_rts/elf_loader.ml
parent7e1293604ff02c072568e03830d25adfea063087 (diff)
parent381a3967ebd9269082b452669f507787decf28b0 (diff)
Merge branch 'experiments' of bitbucket.org:Peter_Sewell/sail into experiments
Diffstat (limited to 'lib/ocaml_rts/elf_loader.ml')
-rw-r--r--lib/ocaml_rts/elf_loader.ml13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/ocaml_rts/elf_loader.ml b/lib/ocaml_rts/elf_loader.ml
index 4e35a192..ab49c57b 100644
--- a/lib/ocaml_rts/elf_loader.ml
+++ b/lib/ocaml_rts/elf_loader.ml
@@ -122,11 +122,8 @@ let load_segment seg =
List.iteri (fun i byte -> Sail_lib.wram (add_big_int paddr (big_int_of_int i)) byte) (List.map int_of_char bs)
let load_elf () =
- let name =
- match !opt_file_arguments with
- | (name :: _) -> name
- | [] -> failwith "Must provide an elf file"
- in
- let segments, e_entry = read name in
- List.iter load_segment segments;
- ()
+ match !opt_file_arguments with
+ | (name :: _) ->
+ let segments, e_entry = read name in
+ List.iter load_segment segments
+ | [] -> ()