Add Minimal Std implementation for UEFI
Implemented modules: 1. alloc 2. os_str 3. env 4. math Tracking Issue: https://github.com/rust-lang/rust/issues/100499 API Change Proposal: https://github.com/rust-lang/libs-team/issues/87 This was originally part of https://github.com/rust-lang/rust/pull/100316. Since that PR was becoming too unwieldy and cluttered, and with suggestion from @dvdhrm, I have extracted a minimal std implementation to this PR. Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
This commit is contained in:
parent
5a4e47ebed
commit
48c6ae0611
24 changed files with 718 additions and 18 deletions
|
@ -46,6 +46,7 @@ pub fn opts() -> TargetOptions {
|
|||
stack_probes: StackProbeType::Call,
|
||||
singlethread: true,
|
||||
linker: Some("rust-lld".into()),
|
||||
entry_name: "efi_main".into(),
|
||||
..base
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,13 +5,14 @@
|
|||
// The win64 ABI is used. It differs from the sysv64 ABI, so we must use a windows target with
|
||||
// LLVM. "x86_64-unknown-windows" is used to get the minimal subset of windows-specific features.
|
||||
|
||||
use crate::spec::Target;
|
||||
use crate::{abi::call::Conv, spec::Target};
|
||||
|
||||
pub fn target() -> Target {
|
||||
let mut base = super::uefi_msvc_base::opts();
|
||||
base.cpu = "x86-64".into();
|
||||
base.plt_by_default = false;
|
||||
base.max_atomic_width = Some(64);
|
||||
base.entry_abi = Conv::X86_64Win64;
|
||||
|
||||
// We disable MMX and SSE for now, even though UEFI allows using them. Problem is, you have to
|
||||
// enable these CPU features explicitly before their first use, otherwise their instructions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue