Skip to content

Commit 76163f4

Browse files
committed
More.
1 parent e767b7d commit 76163f4

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/getauxval.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ use core::ptr::without_provenance_mut;
77

88
// `getauxval` usually returns `unsigned long`, but we make it a pointer type
99
// so that it preserves provenance.
10-
#[no_mangle]
10+
#[unsafe(no_mangle)]
1111
unsafe extern "C" fn getauxval(type_: c_ulong) -> *mut c_void {
12-
_getauxval(type_)
12+
unsafe { _getauxval(type_) }
1313
}
1414

1515
#[cfg(target_arch = "aarch64")]
16-
#[no_mangle]
16+
#[unsafe(no_mangle)]
1717
unsafe extern "C" fn __getauxval(type_: c_ulong) -> *mut c_void {
18-
_getauxval(type_)
18+
unsafe { _getauxval(type_) }
1919
}
2020

2121
fn _getauxval(type_: c_ulong) -> *mut c_void {

src/program/linux_raw.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//! ///
99
//! /// SAFETY: `argc`, `argv`, and `envp` describe incoming program
1010
//! /// command-line arguments and environment variables.
11-
//! #[no_mangle]
11+
//! #[unsafe(no_mangle)]
1212
//! unsafe fn origin_main(argc: usize, argv: *mut *mut u8, envp: *mut *mut u8) -> i32 {
1313
//! todo!("Run the program and return the program exit status.")
1414
//! }

src/thread/linux_raw.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ pub fn yield_current() {
11161116

11171117
/// The ARM ABI expects this to be defined.
11181118
#[cfg(target_arch = "arm")]
1119-
#[no_mangle]
1119+
#[unsafe(no_mangle)]
11201120
extern "C" fn __aeabi_read_tp() -> *mut c_void {
11211121
thread_pointer()
11221122
}

src/unwind_unimplemented.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,31 +74,31 @@ unsafe extern "C" fn _Unwind_GetCFA() {
7474
}
7575

7676
#[cfg(target_arch = "arm")]
77-
#[no_mangle]
77+
#[unsafe(no_mangle)]
7878
unsafe extern "C" fn _Unwind_VRS_Get() {
7979
unimplemented!("_Unwind_VRS_Get")
8080
}
8181

8282
#[cfg(target_arch = "arm")]
83-
#[no_mangle]
83+
#[unsafe(no_mangle)]
8484
unsafe extern "C" fn _Unwind_VRS_Set() {
8585
unimplemented!("_Unwind_VRS_Set")
8686
}
8787

8888
#[cfg(target_arch = "arm")]
89-
#[no_mangle]
89+
#[unsafe(no_mangle)]
9090
unsafe extern "C" fn __aeabi_unwind_cpp_pr0() {
9191
unimplemented!("__aeabi_unwind_cpp_pr0")
9292
}
9393

9494
#[cfg(target_arch = "arm")]
95-
#[no_mangle]
95+
#[unsafe(no_mangle)]
9696
unsafe extern "C" fn __aeabi_unwind_cpp_pr1() {
9797
unimplemented!("__aeabi_unwind_cpp_pr1")
9898
}
9999

100100
#[cfg(target_arch = "arm")]
101-
#[no_mangle]
101+
#[unsafe(no_mangle)]
102102
unsafe extern "C" fn __gnu_unwind_frame() {
103103
unimplemented!("__gnu_unwind_frame")
104104
}

0 commit comments

Comments
 (0)