Skip to content

Commit 4d41efe

Browse files
committed
Use pie relocation model for second stage
1 parent b3207db commit 4d41efe

File tree

4 files changed

+21
-29
lines changed

4 files changed

+21
-29
lines changed

bios/second_stage/build.rs

Lines changed: 0 additions & 9 deletions
This file was deleted.

bios/second_stage/second-stage-link.ld

Lines changed: 0 additions & 19 deletions
This file was deleted.

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ fn build_bios_second_stage(out_dir: &Path) -> PathBuf {
114114
.arg(BOOTLOADER_X86_64_BIOS_SECOND_STAGE_VERSION);
115115
}
116116
cmd.arg("--locked");
117-
cmd.arg("--target").arg("x86-16bit.json");
117+
cmd.arg("--target").arg("x86-16bit-second-stage.json");
118118
cmd.arg("-Zbuild-std=core")
119119
.arg("-Zbuild-std-features=compiler-builtins-mem");
120120
cmd.arg("--root").arg(out_dir);

x86-16bit-second-stage.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"arch": "x86",
3+
"cpu": "i386",
4+
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128",
5+
"dynamic-linking": false,
6+
"executables": true,
7+
"linker-flavor": "ld.lld",
8+
"linker": "rust-lld",
9+
"llvm-target": "i386-unknown-none-code16",
10+
"max-atomic-width": 64,
11+
"position-independent-executables": false,
12+
"disable-redzone": true,
13+
"target-c-int-width": "32",
14+
"target-pointer-width": "32",
15+
"target-endian": "little",
16+
"panic-strategy": "abort",
17+
"os": "none",
18+
"vendor": "unknown",
19+
"relocation-model": "pie"
20+
}

0 commit comments

Comments
 (0)