summaryrefslogtreecommitdiff
path: root/lib/ocaml_rts/linksem/scratch.ml
diff options
context:
space:
mode:
authorAlasdair Armstrong2017-09-07 16:54:20 +0100
committerAlasdair Armstrong2017-09-07 16:54:20 +0100
commit842165c1171fde332bd42e7520338c59a797f76b (patch)
tree75b61297b6d9b6e4810542390eb1371afc2f183f /lib/ocaml_rts/linksem/scratch.ml
parent8124c487b576661dfa7a0833415d07d0978bc43e (diff)
Add ocaml run-time and updates to sail for ocaml backend
Diffstat (limited to 'lib/ocaml_rts/linksem/scratch.ml')
-rw-r--r--lib/ocaml_rts/linksem/scratch.ml28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/ocaml_rts/linksem/scratch.ml b/lib/ocaml_rts/linksem/scratch.ml
new file mode 100644
index 00000000..4b57ba9d
--- /dev/null
+++ b/lib/ocaml_rts/linksem/scratch.ml
@@ -0,0 +1,28 @@
+(*Generated by Lem from scratch.lem.*)
+open Byte_sequence
+open Error
+open Missing_pervasives
+
+open Endianness
+open Show
+
+open Elf_file
+open Elf_header
+open Elf_note
+open Elf_section_header_table
+
+open Gnu_ext_note
+
+let ( _:unit) =
+(let res =
+(Byte_sequence.acquire "/usr/bin/less" >>= (fun bs0 ->
+ Elf_file.read_elf32_file bs0 >>= (fun ef1 ->
+ let endian = (get_elf32_header_endianness ef1.elf32_file_header) in
+ Elf_file.get_elf32_file_section_header_string_table ef1 >>= (fun sect_hdr ->
+ return (gnu_ext_extract_elf32_earliest_compatible_kernel endian ef1.elf32_file_section_header_table sect_hdr bs0)))))
+ in
+ (match res with
+ | Fail err -> print_endline err
+ | Success s -> print_endline (string_of_error
+ instance_Show_Show_string_dict s)
+ ))