pub struct SectionFlags(/* private fields */);
Expand description
Additional attributes for object file sections.
Implementations§
Source§impl SectionFlags
impl SectionFlags
Sourcepub fn write(&self) -> bool
pub fn write(&self) -> bool
Indicates the section contains data that should be writable by the process.
Sourcepub fn allocate(&self) -> bool
pub fn allocate(&self) -> bool
Indicates this section should be loaded into memory when the process is run.
Sourcepub fn execute(&self) -> bool
pub fn execute(&self) -> bool
Indicates this section contains code that should be executable by the process.
Sourcepub fn merged(&self) -> bool
pub fn merged(&self) -> bool
Indicates that multiple sections of this type can be combined while deleting duplicate contents.
Sourcepub fn extra_info_is_link(&self) -> bool
pub fn extra_info_is_link(&self) -> bool
Indicates that the extra_info
field of the
section header contains an index to another section header.
Sourcepub fn keep_order(&self) -> bool
pub fn keep_order(&self) -> bool
Indicates that this section and the [associated_section_index
] should
maintain their relative order when linking.
Sourcepub fn os_nonconforming(&self) -> bool
pub fn os_nonconforming(&self) -> bool
Indicates that the section must be processed in an OS-defined way during linking.
Sourcepub fn group_member(&self) -> bool
pub fn group_member(&self) -> bool
Indicates the section is listed by a section with type SectionType::Group
.
Sourcepub fn thread_locals(&self) -> bool
pub fn thread_locals(&self) -> bool
Indicates the section contains a template for the thread-local storage area.
Sourcepub fn os_defined(&self) -> u8
pub fn os_defined(&self) -> u8
Bits that are left for OS-defined flags.
Sourcepub fn arch_defined(&self) -> u8
pub fn arch_defined(&self) -> u8
Bits that are left for CPU architecture-defined flags.
Sourcepub fn set_write(&mut self, value: bool)
pub fn set_write(&mut self, value: bool)
Indicates the section contains data that should be writable by the process.
Sourcepub fn with_write(&mut self, value: bool) -> Self
pub fn with_write(&mut self, value: bool) -> Self
Indicates the section contains data that should be writable by the process.
Sourcepub fn set_allocate(&mut self, value: bool)
pub fn set_allocate(&mut self, value: bool)
Indicates this section should be loaded into memory when the process is run.
Sourcepub fn with_allocate(&mut self, value: bool) -> Self
pub fn with_allocate(&mut self, value: bool) -> Self
Indicates this section should be loaded into memory when the process is run.
Sourcepub fn set_execute(&mut self, value: bool)
pub fn set_execute(&mut self, value: bool)
Indicates this section contains code that should be executable by the process.
Sourcepub fn with_execute(&mut self, value: bool) -> Self
pub fn with_execute(&mut self, value: bool) -> Self
Indicates this section contains code that should be executable by the process.
Sourcepub fn set_merged(&mut self, value: bool)
pub fn set_merged(&mut self, value: bool)
Indicates that multiple sections of this type can be combined while deleting duplicate contents.
Sourcepub fn with_merged(&mut self, value: bool) -> Self
pub fn with_merged(&mut self, value: bool) -> Self
Indicates that multiple sections of this type can be combined while deleting duplicate contents.
Sourcepub fn set_strings(&mut self, value: bool)
pub fn set_strings(&mut self, value: bool)
Indicates the section contains null-terminate strings.
Sourcepub fn with_strings(&mut self, value: bool) -> Self
pub fn with_strings(&mut self, value: bool) -> Self
Indicates the section contains null-terminate strings.
Sourcepub fn set_extra_info_is_link(&mut self, value: bool)
pub fn set_extra_info_is_link(&mut self, value: bool)
Indicates that the extra_info
field of the
section header contains an index to another section header.
Sourcepub fn with_extra_info_is_link(&mut self, value: bool) -> Self
pub fn with_extra_info_is_link(&mut self, value: bool) -> Self
Indicates that the extra_info
field of the
section header contains an index to another section header.
Sourcepub fn set_keep_order(&mut self, value: bool)
pub fn set_keep_order(&mut self, value: bool)
Indicates that this section and the [associated_section_index
] should
maintain their relative order when linking.
Sourcepub fn with_keep_order(&mut self, value: bool) -> Self
pub fn with_keep_order(&mut self, value: bool) -> Self
Indicates that this section and the [associated_section_index
] should
maintain their relative order when linking.
Sourcepub fn set_os_nonconforming(&mut self, value: bool)
pub fn set_os_nonconforming(&mut self, value: bool)
Indicates that the section must be processed in an OS-defined way during linking.
Sourcepub fn with_os_nonconforming(&mut self, value: bool) -> Self
pub fn with_os_nonconforming(&mut self, value: bool) -> Self
Indicates that the section must be processed in an OS-defined way during linking.
Sourcepub fn set_group_member(&mut self, value: bool)
pub fn set_group_member(&mut self, value: bool)
Indicates the section is listed by a section with type SectionType::Group
.
Sourcepub fn with_group_member(&mut self, value: bool) -> Self
pub fn with_group_member(&mut self, value: bool) -> Self
Indicates the section is listed by a section with type SectionType::Group
.
Sourcepub fn set_thread_locals(&mut self, value: bool)
pub fn set_thread_locals(&mut self, value: bool)
Indicates the section contains a template for the thread-local storage area.
Sourcepub fn with_thread_locals(&mut self, value: bool) -> Self
pub fn with_thread_locals(&mut self, value: bool) -> Self
Indicates the section contains a template for the thread-local storage area.
Sourcepub fn set_os_defined(&mut self, value: u8)
pub fn set_os_defined(&mut self, value: u8)
Bits that are left for OS-defined flags.
Sourcepub fn with_os_defined(&self, value: u8) -> Self
pub fn with_os_defined(&self, value: u8) -> Self
Bits that are left for OS-defined flags.
Sourcepub fn set_arch_defined(&mut self, value: u8)
pub fn set_arch_defined(&mut self, value: u8)
Bits that are left for CPU architecture-defined flags.
Sourcepub fn with_arch_defined(&self, value: u8) -> Self
pub fn with_arch_defined(&self, value: u8) -> Self
Bits that are left for CPU architecture-defined flags.
Trait Implementations§
Source§impl Bitfield<u32> for SectionFlags
impl Bitfield<u32> for SectionFlags
Source§impl Clone for SectionFlags
impl Clone for SectionFlags
Source§fn clone(&self) -> SectionFlags
fn clone(&self) -> SectionFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more