From f9f752d74c4f1f56a89c0fcdd5cab63d2380fe09 Mon Sep 17 00:00:00 2001 From: Robin Randhawa <robin.randhawa@arm.com> Date: Tue, 15 Jan 2019 16:08:50 +0000 Subject: [PATCH] aarch64-prep: Dummy auxv.h For AArch64, the ring crate depends on the presence of this header and a definition of getauxval. --- src/header/mod.rs | 1 + src/header/sys_auxv/cbindgen.toml | 6 ++++++ src/header/sys_auxv/mod.rs | 11 +++++++++++ 3 files changed, 18 insertions(+) create mode 100644 src/header/sys_auxv/cbindgen.toml create mode 100644 src/header/sys_auxv/mod.rs diff --git a/src/header/mod.rs b/src/header/mod.rs index 901238bfa..34a1eae14 100644 --- a/src/header/mod.rs +++ b/src/header/mod.rs @@ -30,6 +30,7 @@ pub mod stdio; pub mod stdlib; pub mod string; pub mod strings; +pub mod sys_auxv; pub mod sys_file; pub mod sys_ioctl; pub mod sys_mman; diff --git a/src/header/sys_auxv/cbindgen.toml b/src/header/sys_auxv/cbindgen.toml new file mode 100644 index 000000000..08b9683cb --- /dev/null +++ b/src/header/sys_auxv/cbindgen.toml @@ -0,0 +1,6 @@ +include_guard = "_SYS_AUXV_H" +language = "C" +style = "Tag" + +[enum] +prefix_with_name = true diff --git a/src/header/sys_auxv/mod.rs b/src/header/sys_auxv/mod.rs new file mode 100644 index 000000000..eeabca08f --- /dev/null +++ b/src/header/sys_auxv/mod.rs @@ -0,0 +1,11 @@ +//! sys/auxv.h implementation + +use platform::types::*; +use platform::{Pal, Sys}; + +pub const AT_HWCAP: usize = 16; + +#[no_mangle] +pub extern "C" fn getauxval(_t: c_ulong) -> c_ulong { + 0 +} -- GitLab