From 6b5556326d9b922b299383de0b7b39f89ab6d595 Mon Sep 17 00:00:00 2001 From: varobert Date: Wed, 4 Apr 2012 11:59:36 +0000 Subject: Adjustments to cchecklink's options and verbosity git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1866 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- checklink/Validator.ml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'checklink/Validator.ml') diff --git a/checklink/Validator.ml b/checklink/Validator.ml index b27bc4c..f91a131 100644 --- a/checklink/Validator.ml +++ b/checklink/Validator.ml @@ -6,7 +6,7 @@ open Fuzz let elf_file = ref (None: string option) let sdump_files = ref ([] : string list) let option_fuzz = ref false -let option_dumpelf = ref false +let option_printelf = ref false let set_elf_file s = match !elf_file with @@ -14,16 +14,20 @@ let set_elf_file s = | Some _ -> raise (Arg.Bad "multiple ELF executables given on command line") let options = [ - "-dumpelf", Arg.Set option_dumpelf, - "Print the contents of the ELF executable"; + "-printelf", Arg.Set option_printelf, + "Print the contents of the unanalyzed ELF executable"; + "-printelfmap", Arg.Set Check.print_elfmap, + "Print a map of the analyzed ELF executable"; "-debug", Arg.Set Check.debug, "Print a detailed trace of verification"; - "-elfmap", Arg.Set Check.dump_elfmap, - "Dump an ELF map to .elfmap>, for use with random fuzzing"; + "-dumpelfmap", Arg.Set Check.dump_elfmap, + "Dump an ELF map to .elfmap, for use with random fuzzing"; "-exe ", Arg.String set_elf_file, "Specify the ELF executable file to analyze"; "-fuzz", Arg.Set option_fuzz, - "Random fuzzing test" + "Random fuzzing test"; + "-noexhaust", Arg.Clear Check.exhaustivity, + "Disable the exhaustivity check of ELF function and data symbols" ] let anonymous arg = @@ -34,7 +38,8 @@ let anonymous arg = let usage = "The CompCert C post-linking validator, version " ^ Configuration.version ^ " -Usage: valink [options] <.sdump files> +Usage: cchecklink [options] <.sdump files> +In the absence of options, checks are performed and a short result is displayed. Options are:" let _ = @@ -48,9 +53,9 @@ let _ = if !option_fuzz then begin Random.self_init(); fuzz_loop elffilename sdumps - end else if !option_dumpelf then begin + end else if !option_printelf then begin let elf = read_elf elffilename in print_endline (string_of_elf elf) end else begin - check_and_dump elffilename sdumps + check_elf_dump elffilename sdumps end -- cgit v1.2.3