Segment

Struct Segment 

Source
pub struct Segment {
Show 25 fields pub name: String, pub files: Vec<FileInfo>, pub fixed_vram: Option<u32>, pub fixed_symbol: Option<String>, pub follows_segment: Option<String>, pub vram_class: Option<String>, pub dir: PathBuf, pub gp_info: Option<GpInfo>, pub include_if_any: Vec<(String, String)>, pub include_if_all: Vec<(String, String)>, pub exclude_if_any: Vec<(String, String)>, pub exclude_if_all: Vec<(String, String)>, pub alloc_sections: Vec<String>, pub noload_sections: Vec<String>, pub subalign: Option<u32>, pub segment_start_align: Option<u32>, pub segment_end_align: Option<u32>, pub section_start_align: Option<u32>, pub section_end_align: Option<u32>, pub sections_start_alignment: HashMap<String, u32>, pub sections_end_alignment: HashMap<String, u32>, pub wildcard_sections: bool, pub fill_value: Option<u32>, pub sections_subgroups: HashMap<String, Vec<String>>, pub keep_sections: KeepSections,
}

Fields§

§name: String

Name of the segment

§files: Vec<FileInfo>

List of files corresponding to this segment

§fixed_vram: Option<u32>

If not None then forces the segment to have a fixed vram address instead of following the previous segment. Not compatible with fixed_symbol, follows_segment or vram_class.

§fixed_symbol: Option<String>

If not None then forces the segment’s vram address to be same as the address of the given symbol instead of following the previous segment. Not compatible with fixed_vram, follows_segment or vram_class.

§follows_segment: Option<String>

If not None then forces the segment’s vram address to be after the specified segment instead of following the previous one. Not compatible with fixed_vram, fixed_symbol or vram_class.

§vram_class: Option<String>

If not None then forces the segment’s vram address to be same as the specified vram class instead of following the previous one. Not compatible with fixed_vram, fixed_symbol or follows_segment.

§dir: PathBuf

Used as a prefix for all the files emitted for this Segment.

§gp_info: Option<GpInfo>§include_if_any: Vec<(String, String)>§include_if_all: Vec<(String, String)>§exclude_if_any: Vec<(String, String)>§exclude_if_all: Vec<(String, String)>§alloc_sections: Vec<String>§noload_sections: Vec<String>§subalign: Option<u32>§segment_start_align: Option<u32>§segment_end_align: Option<u32>§section_start_align: Option<u32>§section_end_align: Option<u32>§sections_start_alignment: HashMap<String, u32>§sections_end_alignment: HashMap<String, u32>§wildcard_sections: bool§fill_value: Option<u32>§sections_subgroups: HashMap<String, Vec<String>>§keep_sections: KeepSections

Implementations§

Source§

impl Segment

Source

pub fn clone_with_new_files(&self, new_files: Vec<FileInfo>) -> Self

Source

pub fn pass_down_keep_sections(&mut self, keep_sections: &KeepSections)

Source§

impl Segment

Trait Implementations§

Source§

impl Clone for Segment

Source§

fn clone(&self) -> Segment

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Segment

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Segment

Source§

fn eq(&self, other: &Segment) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Segment

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.