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

read/archive: AIX big archive enhancements #473

Merged
merged 1 commit into from Oct 10, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 17 additions & 10 deletions src/archive.rs
Expand Up @@ -64,21 +64,28 @@ pub struct AixHeader {
/// The AIX big archive's fixed length header at file beginning.
#[derive(Debug, Clone, Copy)]
#[repr(C)]
pub struct AIXFileHeader {
/// Offset of member table
pub struct AixFileHeader {
/// Archive magic string.
pub magic: [u8; 8],
/// Offset of member table.
pub memoff: [u8; 20],
/// Offset of global symbol table
/// Offset of global symbol table.
pub gstoff: [u8; 20],
/// ffset of global symbol table for 64-bit objects
/// Offset of global symbol table for 64-bit objects.
pub gst64off: [u8; 20],
/// Offset of first member
/// Offset of first member.
pub fstmoff: [u8; 20],
/// Offset of last member
/// Offset of last member.
pub lstmoff: [u8; 20],
/// Offset of first member on free list
/// Offset of first member on free list.
pub freeoff: [u8; 20],
}

unsafe_impl_pod!(Header);
unsafe_impl_pod!(AixHeader);
unsafe_impl_pod!(AIXFileHeader);
/// Offset of a member in an AIX big archive.
///
/// This is used in the member index.
#[derive(Debug, Clone, Copy)]
#[repr(C)]
pub struct AixMemberOffset(pub [u8; 20]);

unsafe_impl_pod!(Header, AixHeader, AixFileHeader, AixMemberOffset,);