File tree 5 files changed +7
-7
lines changed
5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
52
52
#[ cfg( all( target_os = "windows" , target_arch = "x86" , target_env = "gnu" ) ) ]
53
53
pub mod eh_frames {
54
54
#[ no_mangle]
55
- #[ link_section = ".eh_frame" ]
55
+ #[ unsafe ( link_section = ".eh_frame" ) ]
56
56
// Marks beginning of the stack frame unwind info section
57
57
pub static __EH_FRAME_BEGIN__: [ u8 ; 0 ] = [ ] ;
58
58
@@ -101,10 +101,10 @@ pub mod eh_frames {
101
101
// end of the list. Since constructors are run in reverse order, this ensures that our
102
102
// callbacks are the first and last ones executed.
103
103
104
- #[ link_section = ".ctors.65535" ] // .ctors.* : C initialization callbacks
104
+ #[ unsafe ( link_section = ".ctors.65535" ) ] // .ctors.* : C initialization callbacks
105
105
pub static P_INIT : unsafe extern "C" fn ( ) = super :: init;
106
106
107
- #[ link_section = ".dtors.65535" ] // .dtors.* : C termination callbacks
107
+ #[ unsafe ( link_section = ".dtors.65535" ) ] // .dtors.* : C termination callbacks
108
108
pub static P_UNINIT : unsafe extern "C" fn ( ) = super :: uninit;
109
109
}
110
110
}
Original file line number Diff line number Diff line change @@ -32,6 +32,6 @@ pub mod eh_frames {
32
32
// Terminate the frame unwind info section with a 0 as a sentinel;
33
33
// this would be the 'length' field in a real FDE.
34
34
#[ no_mangle]
35
- #[ link_section = ".eh_frame" ]
35
+ #[ unsafe ( link_section = ".eh_frame" ) ]
36
36
pub static __EH_FRAME_END__: u32 = 0 ;
37
37
}
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ mod imp {
147
147
/// This allows `std::env::args` to work even in a `cdylib`, as it does on macOS and Windows.
148
148
#[ cfg( all( target_os = "linux" , target_env = "gnu" ) ) ]
149
149
#[ used]
150
- #[ link_section = ".init_array.00099" ]
150
+ #[ unsafe ( link_section = ".init_array.00099" ) ]
151
151
static ARGV_INIT_ARRAY : extern "C" fn (
152
152
crate :: os:: raw:: c_int ,
153
153
* const * const u8 ,
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ use crate::sys::c;
39
39
// See https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-initialization?view=msvc-170
40
40
#[ cfg( target_vendor = "win7" ) ]
41
41
#[ used]
42
- #[ link_section = ".CRT$XCT" ]
42
+ #[ unsafe ( link_section = ".CRT$XCT" ) ]
43
43
static INIT_TABLE_ENTRY : unsafe extern "C" fn ( ) = init;
44
44
45
45
/// Preload some imported functions.
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ pub fn enable() {
74
74
unsafe { ptr:: from_ref ( & CALLBACK ) . read_volatile ( ) } ;
75
75
}
76
76
77
- #[ link_section = ".CRT$XLB" ]
77
+ #[ unsafe ( link_section = ".CRT$XLB" ) ]
78
78
#[ cfg_attr( miri, used) ] // Miri only considers explicitly `#[used]` statics for `lookup_link_section`
79
79
pub static CALLBACK : unsafe extern "system" fn ( * mut c_void , u32 , * mut c_void ) = tls_callback;
80
80
You can’t perform that action at this time.
0 commit comments