File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 44
44
#![ cfg( not( windows) ) ] // Windows already has builtins to do this
45
45
46
46
#[ naked]
47
- #[ no_mangle]
47
+ #[ cfg_attr ( not ( feature = "mangled-names" ) , no_mangle) ]
48
48
#[ cfg( target_arch = "x86_64" ) ]
49
49
pub unsafe extern fn __rust_probestack ( ) {
50
50
// Our goal here is to touch each page between %rsp+8 and %rsp+8-%rax,
@@ -87,7 +87,7 @@ pub unsafe extern fn __rust_probestack() {
87
87
}
88
88
89
89
#[ naked]
90
- #[ no_mangle]
90
+ #[ cfg_attr ( not ( feature = "mangled-names" ) , no_mangle) ]
91
91
#[ cfg( target_arch = "x86" ) ]
92
92
pub unsafe extern fn __rust_probestack ( ) {
93
93
// This is the same as x86_64 above, only translated for 32-bit sizes. Note
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ use core::intrinsics;
10
10
11
11
#[ cfg( windows) ]
12
12
#[ naked]
13
- #[ no_mangle]
13
+ #[ cfg_attr ( not ( feature = "mangled-names" ) , no_mangle) ]
14
14
pub unsafe fn ___chkstk_ms ( ) {
15
15
asm ! ( "push %rcx
16
16
push %rax
@@ -34,7 +34,7 @@ pub unsafe fn ___chkstk_ms() {
34
34
35
35
#[ cfg( windows) ]
36
36
#[ naked]
37
- #[ no_mangle]
37
+ #[ cfg_attr ( not ( feature = "mangled-names" ) , no_mangle) ]
38
38
pub unsafe fn __alloca ( ) {
39
39
asm ! ( "mov %rcx,%rax // x64 _alloca is a normal function with parameter in rcx
40
40
jmp ___chkstk // Jump to ___chkstk since fallthrough may be unreliable" ) ;
@@ -43,7 +43,7 @@ pub unsafe fn __alloca() {
43
43
44
44
#[ cfg( windows) ]
45
45
#[ naked]
46
- #[ no_mangle]
46
+ #[ cfg_attr ( not ( feature = "mangled-names" ) , no_mangle) ]
47
47
pub unsafe fn ___chkstk ( ) {
48
48
asm ! ( "push %rcx
49
49
cmp $$0x1000,%rax
You can’t perform that action at this time.
0 commit comments