Skip to content

Commit

Permalink
Merge pull request #34 from philipc/pod
Browse files Browse the repository at this point in the history
Use repr(C) for all Pod types
  • Loading branch information
nrc authored Dec 29, 2016
2 parents 4716753 + a68e7da commit bcd7b6d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/dynamic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use core::fmt;
use {P32, P64};
use zero::Pod;

#[repr(C)]
pub struct Dynamic<P> {
tag: Tag_<P>,
un: P,
Expand Down
2 changes: 2 additions & 0 deletions src/hash.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use symbol_table::Entry;
use zero::Pod;

#[derive(Debug)]
#[repr(C)]
pub struct HashTable {
bucket_count: u32,
chain_count: u32,
Expand Down
2 changes: 2 additions & 0 deletions src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ impl<'a> fmt::Display for HeaderPt2<'a> {
}
}

#[derive(Debug)]
#[repr(C)]
pub struct HeaderPt2_<P> {
pub type_: Type_,
pub machine: Machine,
Expand Down
2 changes: 2 additions & 0 deletions src/sections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,13 +405,15 @@ pub const GRP_MASKOS: u64 = 0x0ff00000;
pub const GRP_MASKPROC: u64 = 0xf0000000;

#[derive(Debug)]
#[repr(C)]
pub struct Rela<P> {
offset: P,
info: P,
addend: P,
}

#[derive(Debug)]
#[repr(C)]
pub struct Rel<P> {
offset: P,
info: P,
Expand Down

0 comments on commit bcd7b6d

Please sign in to comment.