From c216e6fa55234f5dbaa857fbe45e395a4522547d Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 24 Oct 2025 16:02:52 -0700 Subject: [PATCH 1/3] Update to linux-raw-sys 0.12.0, MSRV 1.88, and latest Rust nightly. --- .github/workflows/main.yml | 4 ++-- Cargo.toml | 4 ++-- src/relocate.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ee06a4b..d735ee4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: build: [ubuntu, i686-linux, aarch64-linux, riscv64-linux] - rust: [1.85, nightly-2025-04-28] + rust: [1.88, nightly-2025-10-23] include: - build: ubuntu os: ubuntu-latest @@ -51,7 +51,7 @@ jobs: qemu: qemu-riscv64 -L /usr/riscv64-linux-gnu qemu_target: riscv64-linux-user host_target: riscv64gc-unknown-linux-gnu - - rust: nightly-2025-04-28 + - rust: nightly-2025-10-23 features: nightly steps: - uses: actions/checkout@v4 diff --git a/Cargo.toml b/Cargo.toml index 0163060..f599523 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,10 +12,10 @@ edition = "2024" keywords = ["linux"] categories = ["no-std"] include = ["src", "Cargo.toml", "COPYRIGHT", "LICENSE*", "/*.md"] -rust-version = "1.85" +rust-version = "1.88" [dependencies] -linux-raw-sys = { version = "0.9.2", default-features = false, optional = true, features = ["general", "no_std", "elf"] } +linux-raw-sys = { version = "0.12.0", default-features = false, optional = true, features = ["general", "no_std", "elf", "auxvec"] } rustix = { version = "1.0.0", default-features = false } bitflags = { version = "2.4.0", default-features = false } log = { version = "0.4.14", default-features = false, optional = true } diff --git a/src/relocate.rs b/src/relocate.rs index 383f0ed..7176070 100644 --- a/src/relocate.rs +++ b/src/relocate.rs @@ -21,8 +21,8 @@ use crate::arch::{ use core::ffi::c_void; use core::mem; use core::ptr::{null, null_mut}; +use linux_raw_sys::auxvec::{AT_BASE, AT_ENTRY, AT_NULL, AT_PAGESZ}; use linux_raw_sys::elf::*; -use linux_raw_sys::general::{AT_BASE, AT_ENTRY, AT_NULL, AT_PAGESZ}; // The Linux UAPI headers don't define the .relr types and consts yet. #[allow(non_camel_case_types)] From 9839435c33ae8af5b0adcaed2a7feabcfdfc3c7b Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 24 Oct 2025 16:11:27 -0700 Subject: [PATCH 2/3] Fix aarch64. --- src/getauxval.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/getauxval.rs b/src/getauxval.rs index 923da40..d6c7390 100644 --- a/src/getauxval.rs +++ b/src/getauxval.rs @@ -20,9 +20,9 @@ unsafe extern "C" fn __getauxval(type_: c_ulong) -> *mut c_void { fn _getauxval(type_: c_ulong) -> *mut c_void { match type_ as _ { - linux_raw_sys::general::AT_HWCAP => without_provenance_mut(rustix::param::linux_hwcap().0), - linux_raw_sys::general::AT_HWCAP2 => without_provenance_mut(rustix::param::linux_hwcap().1), - linux_raw_sys::general::AT_MINSIGSTKSZ => { + linux_raw_sys::auxval::AT_HWCAP => without_provenance_mut(rustix::param::linux_hwcap().0), + linux_raw_sys::auxval::AT_HWCAP2 => without_provenance_mut(rustix::param::linux_hwcap().1), + linux_raw_sys::auxval::AT_MINSIGSTKSZ => { without_provenance_mut(rustix::param::linux_minsigstksz()) } _ => todo!("unrecognized __getauxval {}", type_), From dc2057a3bedc631171052d6ebc83fdd4e6b7c915 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 24 Oct 2025 16:24:45 -0700 Subject: [PATCH 3/3] Fix spelling. --- src/getauxval.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/getauxval.rs b/src/getauxval.rs index d6c7390..0b33ddf 100644 --- a/src/getauxval.rs +++ b/src/getauxval.rs @@ -20,9 +20,9 @@ unsafe extern "C" fn __getauxval(type_: c_ulong) -> *mut c_void { fn _getauxval(type_: c_ulong) -> *mut c_void { match type_ as _ { - linux_raw_sys::auxval::AT_HWCAP => without_provenance_mut(rustix::param::linux_hwcap().0), - linux_raw_sys::auxval::AT_HWCAP2 => without_provenance_mut(rustix::param::linux_hwcap().1), - linux_raw_sys::auxval::AT_MINSIGSTKSZ => { + linux_raw_sys::auxvec::AT_HWCAP => without_provenance_mut(rustix::param::linux_hwcap().0), + linux_raw_sys::auxvec::AT_HWCAP2 => without_provenance_mut(rustix::param::linux_hwcap().1), + linux_raw_sys::auxvec::AT_MINSIGSTKSZ => { without_provenance_mut(rustix::param::linux_minsigstksz()) } _ => todo!("unrecognized __getauxval {}", type_),