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

Fix invalid constants in patterns #6

Merged
merged 1 commit into from
Oct 6, 2016
Merged
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
14 changes: 7 additions & 7 deletions src/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use core::fmt;
pub const ELF_MAGIC: &'static [u8] = &[0x7f, 'E' as u8, 'L' as u8, 'F' as u8];

/// Represents the ELF file class (32-bit vs 64-bit)
#[derive(Copy, Clone, PartialEq)]
#[derive(Copy, Clone, PartialEq, Eq)]
pub struct Class(pub u8);

/// Invalid ELF file class
Expand Down Expand Up @@ -33,7 +33,7 @@ impl fmt::Display for Class {
}

/// Represents the ELF file data format (little-endian vs big-endian)
#[derive(Copy, Clone, PartialEq)]
#[derive(Copy, Clone, PartialEq, Eq)]
pub struct Data(pub u8);

/// Invalid ELF data format
Expand Down Expand Up @@ -461,7 +461,7 @@ impl fmt::Display for ProgFlag {
}

/// Represents ELF Program Header type
#[derive(Copy, Clone, PartialEq)]
#[derive(Copy, Clone, PartialEq, Eq)]
pub struct ProgType(pub u32);

/// Program header table entry unused
Expand Down Expand Up @@ -546,7 +546,7 @@ impl fmt::Display for ProgramHeader {
}

/// Represens ELF Section type
#[derive(Copy, Clone, PartialEq)]
#[derive(Copy, Clone, PartialEq, Eq)]
pub struct SectionType(pub u32);

/// Inactive section with undefined values
Expand Down Expand Up @@ -727,7 +727,7 @@ impl fmt::Display for SectionHeader {
}
}

#[derive(Copy, Clone)]
#[derive(Copy, Clone, PartialEq, Eq)]
pub struct SymbolType(pub u8);

/// Unspecified symbol type
Expand Down Expand Up @@ -764,7 +764,7 @@ impl fmt::Display for SymbolType {
}
}

#[derive(Copy, Clone)]
#[derive(Copy, Clone, PartialEq, Eq)]
pub struct SymbolBind(pub u8);

/// Local symbol
Expand All @@ -789,7 +789,7 @@ impl fmt::Display for SymbolBind {
}
}

#[derive(Copy, Clone)]
#[derive(Copy, Clone, PartialEq, Eq)]
pub struct SymbolVis(pub u8);

/// Default symbol visibility
Expand Down