3 files changed +27
-16
lines changed Original file line number Diff line number Diff line change 1
1
run-make/archive-duplicate-names/Makefile
2
2
run-make/atomic-lock-free/Makefile
3
- run-make/branch-protection-check-IBT/Makefile
4
3
run-make/c-dynamic-dylib/Makefile
5
4
run-make/c-dynamic-rlib/Makefile
6
5
run-make/c-static-dylib/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // Check for GNU Property Note
2
+
3
+ // How to run this
4
+ // python3 x.py test --target x86_64-unknown-linux-gnu tests/run-make/branch-protection-check-IBT/
5
+
6
+ //@ only-x86_64
7
+
8
+ use run_make_support:: llvm_readobj;
9
+ use run_make_support:: rustc;
10
+ use run_make_support:: { cwd, env_var, llvm_components_contain} ;
11
+
12
+ fn main ( ) {
13
+ if !llvm_components_contain ( "x86" ) {
14
+ return ;
15
+ }
16
+
17
+ rustc ( )
18
+ . input ( "main.rs" )
19
+ . target ( "x86_64-unknown-linux-gnu" )
20
+ . arg ( "-Zcf-protection=branch" )
21
+ . arg ( format ! ( "-L{}" , cwd( ) . display( ) ) )
22
+ . arg ( "-Clink-args=-nostartfiles" )
23
+ . arg ( "-Csave-temps" )
24
+ . run ( ) ;
25
+
26
+ llvm_readobj ( ) . notes ( ) . input ( "main" ) . run ( ) . assert_stdout_contains ( ".note.gnu.property" ) ;
27
+ }
0 commit comments