From b9bd878207c6b784694c15675a09636d112242d7 Mon Sep 17 00:00:00 2001 From: David Li Date: Mon, 4 Jan 2016 11:09:51 -0700 Subject: Implement initializing memory from text/data segments --- src/binary.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/binary.rs') diff --git a/src/binary.rs b/src/binary.rs index 122af51..a1d447e 100644 --- a/src/binary.rs +++ b/src/binary.rs @@ -22,6 +22,7 @@ use std::num; use std::path::Path; use std::str; +/// Representation of a binary pub struct Binary { pub words: Vec, } @@ -72,6 +73,7 @@ impl From for BinaryError { } impl Binary { + /// Load a binary from a hex file (generated with elf2hex) pub fn new_from_hex_file(path: &Path) -> Result { let file = try!(File::open(path)); let file = io::BufReader::new(file); -- cgit v1.2.3