Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use repr(C) for all Pod types #34

Merged
merged 1 commit into from
Dec 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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