From e4a2b9205daa7dd8a3a05b3a972d00c23f2adc7a Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Mon, 18 Sep 2017 19:01:16 +0100 Subject: Added additional utility functions in ast_util Also fixed basic ocaml test suite --- lib/ocaml_rts/elf_loader.ml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'lib/ocaml_rts/elf_loader.ml') 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 + | [] -> () -- cgit v1.2.3