File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Expand file tree Collapse file tree 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) {
5252#[ cfg( all( target_os = "windows" , target_arch = "x86" , target_env = "gnu" ) ) ]
5353pub mod eh_frames {
5454 #[ no_mangle]
55- #[ link_section = ".eh_frame" ]
55+ #[ unsafe ( link_section = ".eh_frame" ) ]
5656 // Marks beginning of the stack frame unwind info section
5757 pub static __EH_FRAME_BEGIN__: [ u8 ; 0 ] = [ ] ;
5858
@@ -101,10 +101,10 @@ pub mod eh_frames {
101101 // end of the list. Since constructors are run in reverse order, this ensures that our
102102 // callbacks are the first and last ones executed.
103103
104- #[ link_section = ".ctors.65535" ] // .ctors.* : C initialization callbacks
104+ #[ unsafe ( link_section = ".ctors.65535" ) ] // .ctors.* : C initialization callbacks
105105 pub static P_INIT : unsafe extern "C" fn ( ) = super :: init;
106106
107- #[ link_section = ".dtors.65535" ] // .dtors.* : C termination callbacks
107+ #[ unsafe ( link_section = ".dtors.65535" ) ] // .dtors.* : C termination callbacks
108108 pub static P_UNINIT : unsafe extern "C" fn ( ) = super :: uninit;
109109 }
110110}
Original file line number Diff line number Diff line change @@ -32,6 +32,6 @@ pub mod eh_frames {
3232 // Terminate the frame unwind info section with a 0 as a sentinel;
3333 // this would be the 'length' field in a real FDE.
3434 #[ no_mangle]
35- #[ link_section = ".eh_frame" ]
35+ #[ unsafe ( link_section = ".eh_frame" ) ]
3636 pub static __EH_FRAME_END__: u32 = 0 ;
3737}
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ mod imp {
147147 /// This allows `std::env::args` to work even in a `cdylib`, as it does on macOS and Windows.
148148 #[ cfg( all( target_os = "linux" , target_env = "gnu" ) ) ]
149149 #[ used]
150- #[ link_section = ".init_array.00099" ]
150+ #[ unsafe ( link_section = ".init_array.00099" ) ]
151151 static ARGV_INIT_ARRAY : extern "C" fn (
152152 crate :: os:: raw:: c_int ,
153153 * const * const u8 ,
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ use crate::sys::c;
3939// See https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-initialization?view=msvc-170
4040#[ cfg( target_vendor = "win7" ) ]
4141#[ used]
42- #[ link_section = ".CRT$XCT" ]
42+ #[ unsafe ( link_section = ".CRT$XCT" ) ]
4343static INIT_TABLE_ENTRY : unsafe extern "C" fn ( ) = init;
4444
4545/// Preload some imported functions.
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ pub fn enable() {
7474 unsafe { ptr:: from_ref ( & CALLBACK ) . read_volatile ( ) } ;
7575}
7676
77- #[ link_section = ".CRT$XLB" ]
77+ #[ unsafe ( link_section = ".CRT$XLB" ) ]
7878#[ cfg_attr( miri, used) ] // Miri only considers explicitly `#[used]` statics for `lookup_link_section`
7979pub static CALLBACK : unsafe extern "system" fn ( * mut c_void , u32 , * mut c_void ) = tls_callback;
8080
You can’t perform that action at this time.
0 commit comments