From e7e1c4cfc4998ed6e4f176521a853f33445225f6 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 29 Apr 2025 13:07:52 -0700 Subject: [PATCH] Add unsafe to more `extern "C"` blocks. --- src/program/linux_raw.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/program/linux_raw.rs b/src/program/linux_raw.rs index 9266b80..e469c94 100644 --- a/src/program/linux_raw.rs +++ b/src/program/linux_raw.rs @@ -112,7 +112,7 @@ pub(super) unsafe extern "C" fn entry(mem: *mut usize) -> ! { // The linker-generated symbols that mark the start and end of the // `.init_array` section. - extern "C" { + unsafe extern "C" { static __init_array_start: c_void; static __init_array_end: c_void; } @@ -307,7 +307,7 @@ pub fn exit(status: c_int) -> ! { // The linker-generated symbols that mark the start and end of the // `.fini_array` section. - extern "C" { + unsafe extern "C" { static __fini_array_start: c_void; static __fini_array_end: c_void; }