diff options
author | David Li <li.davidm96@gmail.com> | 2016-01-04 11:09:51 -0700 |
---|---|---|
committer | David Li <li.davidm96@gmail.com> | 2016-01-04 11:09:51 -0700 |
commit | b9bd878207c6b784694c15675a09636d112242d7 (patch) | |
tree | 46ee80da19c49a951eef986562c068e147e0409f /src/rust-elfloader | |
parent | 1e93d4c727f632cd5d6cdc90e6d8a21883d6f409 (diff) |
Implement initializing memory from text/data segments
Diffstat (limited to 'src/rust-elfloader')
-rw-r--r-- | src/rust-elfloader/src/elf.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/rust-elfloader/src/elf.rs b/src/rust-elfloader/src/elf.rs index 5a1df57..46b8eb8 100644 --- a/src/rust-elfloader/src/elf.rs +++ b/src/rust-elfloader/src/elf.rs @@ -641,7 +641,7 @@ impl fmt::Display for SectionType { /// Wrapper type for SectionFlag /// #[derive(Copy, Clone, PartialEq)] -pub struct SectionFlag(pub u64); +pub struct SectionFlag(pub u32); /// Empty flags pub const SHF_NONE : SectionFlag = SectionFlag(0); @@ -704,19 +704,19 @@ pub struct SectionHeader { /// Section Flags pub flags: SectionFlag, /// in-memory address where this section is loaded - pub addr: u64, + pub addr: u32, /// Byte-offset into the file where this section starts - pub offset: u64, + pub offset: u32, /// Section size in bytes - pub size: u64, + pub size: u32, /// Defined by section type pub link: u32, /// Defined by section type pub info: u32, /// address alignment - pub addralign: u64, + pub addralign: u32, /// size of an entry if section data is an array of entries - pub entsize: u64, + pub entsize: u32, } impl fmt::Display for SectionHeader { @@ -817,13 +817,13 @@ impl fmt::Display for SymbolVis { pub struct Symbol { /// Symbol name pub name: StrOffset, + /// Symbol value + pub value: u32, + /// Symbol size + pub size: u32, info: u8, other: u8, section_index: u16, - /// Symbol value - pub value: u64, - /// Symbol size - pub size: u64, } impl fmt::Display for Symbol { |