diff options
author | varobert <varobert@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-05-10 07:53:57 +0000 |
---|---|---|
committer | varobert <varobert@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-05-10 07:53:57 +0000 |
commit | 521dac4e0d950e6128b266b27eac1875d79200f1 (patch) | |
tree | f8b73847a64c769264065c88a31a413f3c3511e4 /checklink/Validator.ml | |
parent | a6044b4a4d38354411cbf535472776f4d5bb30d5 (diff) | |
download | compcert-521dac4e0d950e6128b266b27eac1875d79200f1.tar.gz compcert-521dac4e0d950e6128b266b27eac1875d79200f1.zip |
cchecklink now reads segments instead of sections
cchecklink is now using program header information to figure out the
initial address space of the program, rather than the information in the
parent section of each symbol. This decouples the resolution of symbols
from inaccurate section information, reflecting more the actual program
loading. Additionally, a -relaxed option has been added to deal with
some strange ELFs, for instance when symbols data is dynamically
bootstrapped from another place by boot code different than the program
loader.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1893 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'checklink/Validator.ml')
-rw-r--r-- | checklink/Validator.ml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/checklink/Validator.ml b/checklink/Validator.ml index c413c75b..55e4da1f 100644 --- a/checklink/Validator.ml +++ b/checklink/Validator.ml @@ -10,9 +10,10 @@ let option_bytefuzz = ref false let option_printelf = ref false let set_elf_file s = - match !elf_file with + begin match !elf_file with | None -> elf_file := Some s | Some _ -> raise (Arg.Bad "multiple ELF executables given on command line") + end let options = [ "-exe <filename>", Arg.String set_elf_file, @@ -33,6 +34,9 @@ let options = [ "Random fuzz testing byte per byte"; "-debugfuzz", Arg.Set Fuzz.fuzz_debug, "Print a detailed trace of ongoing fuzz testing"; + "-relaxed", Arg.Set ELF_parsers.relaxed, + "Allows the following behaviors in the ELF parser: +\t* Use of a fallback heuristic to resolve symbols bootstrapped at load time"; ] let anonymous arg = @@ -49,7 +53,7 @@ Options are:" let _ = Arg.parse options anonymous usage; - match !elf_file with + begin match !elf_file with | None -> Arg.usage options usage; exit 2 @@ -67,3 +71,4 @@ let _ = end else begin check_elf_dump elffilename sdumps end + end |