-
Notifications
You must be signed in to change notification settings - Fork 51
Add arm64 image header bindings #118
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
Merged
sunfishcode
merged 2 commits into
sunfishcode:main
from
morr0ne:feature/arm-image-header
Feb 14, 2025
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #if defined(__aarch64__) | ||
| #include <linux/types.h> | ||
| #include <asm/image.h> | ||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| /* automatically generated by rust-bindgen 0.70.1 */ | ||
|
|
||
| pub type __s8 = crate::ctypes::c_schar; | ||
| pub type __u8 = crate::ctypes::c_uchar; | ||
| pub type __s16 = crate::ctypes::c_short; | ||
| pub type __u16 = crate::ctypes::c_ushort; | ||
| pub type __s32 = crate::ctypes::c_int; | ||
| pub type __u32 = crate::ctypes::c_uint; | ||
| pub type __s64 = crate::ctypes::c_longlong; | ||
| pub type __u64 = crate::ctypes::c_ulonglong; | ||
| pub type __kernel_key_t = crate::ctypes::c_int; | ||
| pub type __kernel_mqd_t = crate::ctypes::c_int; | ||
| pub type __kernel_old_uid_t = crate::ctypes::c_ushort; | ||
| pub type __kernel_old_gid_t = crate::ctypes::c_ushort; | ||
| pub type __kernel_long_t = crate::ctypes::c_long; | ||
| pub type __kernel_ulong_t = crate::ctypes::c_ulong; | ||
| pub type __kernel_ino_t = __kernel_ulong_t; | ||
| pub type __kernel_mode_t = crate::ctypes::c_uint; | ||
| pub type __kernel_pid_t = crate::ctypes::c_int; | ||
| pub type __kernel_ipc_pid_t = crate::ctypes::c_int; | ||
| pub type __kernel_uid_t = crate::ctypes::c_uint; | ||
| pub type __kernel_gid_t = crate::ctypes::c_uint; | ||
| pub type __kernel_suseconds_t = __kernel_long_t; | ||
| pub type __kernel_daddr_t = crate::ctypes::c_int; | ||
| pub type __kernel_uid32_t = crate::ctypes::c_uint; | ||
| pub type __kernel_gid32_t = crate::ctypes::c_uint; | ||
| pub type __kernel_old_dev_t = crate::ctypes::c_uint; | ||
| pub type __kernel_size_t = __kernel_ulong_t; | ||
| pub type __kernel_ssize_t = __kernel_long_t; | ||
| pub type __kernel_ptrdiff_t = __kernel_long_t; | ||
| pub type __kernel_off_t = __kernel_long_t; | ||
| pub type __kernel_loff_t = crate::ctypes::c_longlong; | ||
| pub type __kernel_old_time_t = __kernel_long_t; | ||
| pub type __kernel_time_t = __kernel_long_t; | ||
| pub type __kernel_time64_t = crate::ctypes::c_longlong; | ||
| pub type __kernel_clock_t = __kernel_long_t; | ||
| pub type __kernel_timer_t = crate::ctypes::c_int; | ||
| pub type __kernel_clockid_t = crate::ctypes::c_int; | ||
| pub type __kernel_caddr_t = *mut crate::ctypes::c_char; | ||
| pub type __kernel_uid16_t = crate::ctypes::c_ushort; | ||
| pub type __kernel_gid16_t = crate::ctypes::c_ushort; | ||
| pub type __s128 = i128; | ||
| pub type __u128 = u128; | ||
| pub type __le16 = __u16; | ||
| pub type __be16 = __u16; | ||
| pub type __le32 = __u32; | ||
| pub type __be32 = __u32; | ||
| pub type __le64 = __u64; | ||
| pub type __be64 = __u64; | ||
| pub type __sum16 = __u16; | ||
| pub type __wsum = __u32; | ||
| pub type __poll_t = crate::ctypes::c_uint; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct arm64_image_header { | ||
| pub code0: __le32, | ||
| pub code1: __le32, | ||
| pub text_offset: __le64, | ||
| pub image_size: __le64, | ||
| pub flags: __le64, | ||
| pub res2: __le64, | ||
| pub res3: __le64, | ||
| pub res4: __le64, | ||
| pub magic: __le32, | ||
| pub res5: __le32, | ||
| } | ||
| pub const __BITS_PER_LONG_LONG: u32 = 64; | ||
| pub const ARM64_IMAGE_MAGIC: &[u8; 5] = b"ARMd\0"; | ||
| pub const ARM64_IMAGE_FLAG_BE_SHIFT: u32 = 0; | ||
| pub const ARM64_IMAGE_FLAG_PAGE_SIZE_SHIFT: u32 = 1; | ||
| pub const ARM64_IMAGE_FLAG_PHYS_BASE_SHIFT: u32 = 3; | ||
| pub const ARM64_IMAGE_FLAG_BE_MASK: u32 = 1; | ||
| pub const ARM64_IMAGE_FLAG_PAGE_SIZE_MASK: u32 = 3; | ||
| pub const ARM64_IMAGE_FLAG_PHYS_BASE_MASK: u32 = 1; | ||
| pub const ARM64_IMAGE_FLAG_LE: u32 = 0; | ||
| pub const ARM64_IMAGE_FLAG_BE: u32 = 1; | ||
| pub const ARM64_IMAGE_FLAG_PAGE_SIZE_4K: u32 = 1; | ||
| pub const ARM64_IMAGE_FLAG_PAGE_SIZE_16K: u32 = 2; | ||
| pub const ARM64_IMAGE_FLAG_PAGE_SIZE_64K: u32 = 3; | ||
| pub const ARM64_IMAGE_FLAG_PHYS_BASE: u32 = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /* automatically generated by rust-bindgen 0.70.1 */ | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /* automatically generated by rust-bindgen 0.70.1 */ | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /* automatically generated by rust-bindgen 0.70.1 */ | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /* automatically generated by rust-bindgen 0.70.1 */ | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /* automatically generated by rust-bindgen 0.70.1 */ | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /* automatically generated by rust-bindgen 0.70.1 */ | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /* automatically generated by rust-bindgen 0.70.1 */ | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /* automatically generated by rust-bindgen 0.70.1 */ | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /* automatically generated by rust-bindgen 0.70.1 */ | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /* automatically generated by rust-bindgen 0.70.1 */ | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /* automatically generated by rust-bindgen 0.70.1 */ | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /* automatically generated by rust-bindgen 0.70.1 */ | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /* automatically generated by rust-bindgen 0.70.1 */ | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /* automatically generated by rust-bindgen 0.70.1 */ | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /* automatically generated by rust-bindgen 0.70.1 */ | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /* automatically generated by rust-bindgen 0.70.1 */ | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /* automatically generated by rust-bindgen 0.70.1 */ | ||
|
|
||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.