git.annexia.org
/
ocaml-bitstring.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed13357
)
Seems that the ELF fields are little-endian.
author
Richard W.M. Jones
<rich@annexia.org>
Sun, 18 May 2008 20:11:19 +0000
(20:11 +0000)
committer
Richard W.M. Jones
<rich@annexia.org>
Sun, 18 May 2008 20:11:19 +0000
(20:11 +0000)
examples/elf.ml
patch
|
blob
|
history
diff --git
a/examples/elf.ml
b/examples/elf.ml
index
bafb490
..
f8bf341
100644
(file)
--- a/
examples/elf.ml
+++ b/
examples/elf.ml
@@
-11,8
+11,8
@@
let () =
bitmatch bits with
| { 0x7f : 8; "ELF" : 24 : string; (* ELF magic number *)
_ : 12*8 : bitstring; (* ELF identifier *)
- e_type : 16
;
(* object file type *)
- e_machine : 16
(* architecture *)
+ e_type : 16
: littleendian;
(* object file type *)
+ e_machine : 16
: littleendian
(* architecture *)
} ->
printf "%s: ELF binary, type %d, arch %d\n" filename e_type e_machine