Skip to content

Commit 88fca3d

Browse files
committed
don't use no_main and no_core to test IBT
1 parent fe55364 commit 88fca3d

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#![no_std]

‎tests/run-make/branch-protection-check-IBT/main.rs‎

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

‎tests/run-make/branch-protection-check-IBT/rmake.rs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,13 @@ use run_make_support::{bare_rustc, llvm_readobj};
4343
fn main() {
4444
// `main.rs` is `#![no_std]` to not pull in the currently not-compiled-with-IBT precompiled std.
4545
bare_rustc()
46-
.input("main.rs")
46+
.input("lib.rs")
47+
.crate_type("lib")
48+
.emit("obj=lib.o")
4749
.target("x86_64-unknown-linux-gnu")
4850
.arg("-Zcf-protection=branch")
4951
.arg("-Clink-args=-nostartfiles")
5052
.run();
5153

52-
llvm_readobj().arg("-nW").input("main").run().assert_stdout_contains(".note.gnu.property");
54+
llvm_readobj().arg("-nW").input("lib.o").run().assert_stdout_contains(".note.gnu.property");
5355
}

0 commit comments

Comments
 (0)