pub struct Property {
pub features: u32,
}Expand description
What a file says it was built to have checked, which is what -fcf-protection= asks for.
Design: spec/11-asm-objects-debug.md section 11.3, and spec/04-driver-and-cli.md section 4.7
for the flag.
A machine’s control flow checks are turned on for a whole process or not at all, never for one function, so a program made of one object built with them and one built without has to be run one way or the other. What everybody settled on is that each object records what it was built for, the linker keeps only what every input agreed on, and the loader turns on what is left. So an object that records nothing turns the check off for every object it is linked with, which is why this is written even when the flag changed no instruction in the file.
One number rather than a pair of flags, because that is what the record holds: a word of bits whose meaning is the machine’s, and a linker that has never heard of a bit still knows to drop it when one input does not have it.
Fields§
§features: u32The bits of the x86 feature word, which are Self::IBT and Self::SHSTK.
Implementations§
Source§impl Property
impl Property
Sourcepub const X86_FEATURES: u32 = 0xc000_0002
pub const X86_FEATURES: u32 = 0xc000_0002
Which property the feature word is, which is the key the record is written under.
Sourcepub const IBT: u32 = 1
pub const IBT: u32 = 1
Indirect branch tracking: every indirect call and jump in the file arrives at a landing pad, so the machine may fault on one that does not.
Trait Implementations§
impl Copy for Property
impl Eq for Property
impl StructuralPartialEq for Property
Auto Trait Implementations§
impl Freeze for Property
impl RefUnwindSafe for Property
impl Send for Property
impl Sync for Property
impl Unpin for Property
impl UnsafeUnpin for Property
impl UnwindSafe for Property
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.