Use forked rust
This commit is contained in:
parent
33566ba3bb
commit
b8a2b468a1
5 changed files with 2 additions and 113 deletions
|
@ -1,5 +1,2 @@
|
|||
[build]
|
||||
target = "./x86_64-unknown-hypericum.json"
|
||||
|
||||
[unstable]
|
||||
build-std = ["core", "alloc"]
|
||||
target = "x86_64-unknown-hypericum"
|
4
build.rs
4
build.rs
|
@ -1,4 +0,0 @@
|
|||
fn main() {
|
||||
println!("cargo:rustc-link-arg=-Tlinkers/x86_64.ld");
|
||||
println!("cargo:rerun-if-changed=linkers/x86_64.ld");
|
||||
}
|
|
@ -1,72 +0,0 @@
|
|||
/* Tell the linker that we want an x86_64 ELF64 output file */
|
||||
OUTPUT_FORMAT(elf64-x86-64)
|
||||
OUTPUT_ARCH(i386:x86-64)
|
||||
|
||||
/* We want the symbol _kmain to be our entry point */
|
||||
ENTRY(_kmain)
|
||||
|
||||
/* Define the program headers we want so the bootloader gives us the right */
|
||||
/* MMU permissions */
|
||||
PHDRS
|
||||
{
|
||||
text PT_LOAD FLAGS(0x05); /* Execute + Read */
|
||||
rodata PT_LOAD FLAGS(0x04); /* Read only */
|
||||
data PT_LOAD FLAGS(0x06); /* Write + Read */
|
||||
dynamic PT_DYNAMIC FLAGS(0x06); /* Dynamic PHDR for relocations */
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
/* We wanna be placed in the topmost 2GiB of the address space, for optimisations */
|
||||
/* Any address in this region will do, but often 0xffffffff80000000 is chosen as */
|
||||
/* that is the beginning of the region. */
|
||||
. = 0xffffffff80000000;
|
||||
|
||||
.text : {
|
||||
*(.text .text.*)
|
||||
} :text
|
||||
|
||||
/* Move to the next memory page for .rodata */
|
||||
. = ALIGN(CONSTANT(MAXPAGESIZE));
|
||||
|
||||
.rodata : {
|
||||
*(.rodata .rodata.*)
|
||||
} :rodata
|
||||
|
||||
/* Move to the next memory page for .data */
|
||||
. = ALIGN(CONSTANT(MAXPAGESIZE));
|
||||
|
||||
.data : {
|
||||
*(.data .data.*)
|
||||
|
||||
/* Place the sections that contain the requests as part of the .data */
|
||||
/* output section. */
|
||||
KEEP(*(.requests_start_marker))
|
||||
KEEP(*(.requests))
|
||||
KEEP(*(.requests_end_marker))
|
||||
} :data
|
||||
|
||||
/* Dynamic section for relocations, both in its own PHDR and inside data PHDR */
|
||||
.dynamic : {
|
||||
*(.dynamic)
|
||||
} :data :dynamic
|
||||
|
||||
/* NOTE: .bss needs to be the last thing mapped to :data, otherwise lots of */
|
||||
/* unnecessary zeros will be written to the binary. */
|
||||
/* If you need, for example, .init_array and .fini_array, those should be placed */
|
||||
/* above this. */
|
||||
.bss : {
|
||||
*(.bss .bss.*)
|
||||
*(COMMON)
|
||||
} :data
|
||||
|
||||
/* Discard .note.* and .eh_frame* since they may cause issues on some hosts. */
|
||||
/* Also discard the program interpreter section since we do not need one. This is */
|
||||
/* more or less equivalent to the --no-dynamic-linker linker flag, except that it */
|
||||
/* works with ld.gold. */
|
||||
/DISCARD/ : {
|
||||
*(.eh_frame*)
|
||||
*(.note .note.*)
|
||||
*(.interp)
|
||||
}
|
||||
}
|
|
@ -1,2 +1,2 @@
|
|||
[toolchain]
|
||||
channel = "nightly"
|
||||
channel = "x86_64-unknown-hypericum"
|
|
@ -1,32 +0,0 @@
|
|||
{
|
||||
"arch": "x86_64",
|
||||
"cpu": "x86-64",
|
||||
"crt-objects-fallback": "false",
|
||||
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",
|
||||
"disable-redzone": true,
|
||||
"features": "-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2,+soft-float",
|
||||
"linker": "rust-lld",
|
||||
"linker-flavor": "gnu-lld",
|
||||
"llvm-target": "x86_64-unknown-none-elf",
|
||||
"max-atomic-width": 64,
|
||||
"metadata": {
|
||||
"description": "Hypericum",
|
||||
"host_tools": false,
|
||||
"std": false
|
||||
},
|
||||
"os": "hypericum",
|
||||
"panic-strategy": "abort",
|
||||
"plt-by-default": false,
|
||||
"position-independent-executables": false,
|
||||
"relro-level": "off",
|
||||
"rustc-abi": "x86-softfloat",
|
||||
"stack-probes": {
|
||||
"kind": "inline"
|
||||
},
|
||||
"static-position-independent-executables": true,
|
||||
"supported-sanitizers": [
|
||||
"kcfi",
|
||||
"kernel-address"
|
||||
],
|
||||
"target-pointer-width": "64"
|
||||
}
|
Loading…
Add table
Reference in a new issue