Make rustc directly invoke the linker

This commit is contained in:
bjorn3
2023-10-03 09:53:37 +02:00
parent b9299224ea
commit d819277d56
5 changed files with 13 additions and 14 deletions
-5
View File
@@ -4,11 +4,6 @@ version = "0.4.1"
build = "build.rs"
edition = "2021"
[lib]
name = "kernel"
path = "src/lib.rs"
crate-type = ["staticlib"]
[build-dependencies]
cc = "1.0.3"
rustc-cfg = "0.3.0"
+1
View File
@@ -55,6 +55,7 @@
#![feature(slice_ptr_get, slice_ptr_len)]
#![feature(sync_unsafe_cell)]
#![no_std]
#![no_main]
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
pub extern crate x86;
+4 -3
View File
@@ -8,14 +8,15 @@
"os": "none",
"env": "",
"vendor": "unknown",
"linker-flavor": "gcc",
"linker": "rust-lld",
"linker-flavor": "gnu-lld",
"target-family": "redox",
"pre-link-args": {
"gcc": ["-m64", "-nostdlib", "-static"]
"gnu-lld": ["-z", "max-page-size=0x1000"]
},
"features": "+strict-align,-neon,-fp-armv8,+tpidr-el1",
"dynamic-linking": false,
"executables": false,
"executables": true,
"relocation-model": "pic",
"disable-redzone": true,
"frame-pointer": "always",
+4 -3
View File
@@ -8,14 +8,15 @@
"os": "none",
"env": "",
"vendor": "unknown",
"linker-flavor": "gcc",
"linker": "rust-lld",
"linker-flavor": "gnu-lld",
"target-family": "redox",
"pre-link-args": {
"gcc": ["-m32", "-nostdlib", "-static"]
"gnu-lld": ["-z", "max-page-size=0x1000"]
},
"features": "-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-3dnow,-3dnowa,-avx,-avx2,+soft-float",
"dynamic-linking": false,
"executables": false,
"executables": true,
"relocation-model": "static",
"code-model": "kernel",
"disable-redzone": true,
+4 -3
View File
@@ -8,14 +8,15 @@
"os": "none",
"env": "",
"vendor": "unknown",
"linker-flavor": "gcc",
"linker": "rust-lld",
"linker-flavor": "gnu-lld",
"target-family": "redox",
"pre-link-args": {
"gcc": ["-m64", "-nostdlib", "-static"]
"gnu-lld": ["-z", "max-page-size=0x1000"]
},
"features": "-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-3dnow,-3dnowa,-avx,-avx2,+soft-float",
"dynamic-linking": false,
"executables": false,
"executables": true,
"relocation-model": "static",
"code-model": "kernel",
"disable-redzone": true,