Browse Source

Merge branch 'aarch64-prep' into 'master'

Aarch64 prep redux

See merge request redox-os/relibc!202
jD91mZM2 6 years ago
parent
commit
640c6d41a7

+ 4 - 2
include/bits/wchar.h

@@ -6,7 +6,9 @@
 #define WCHAR_MIN (0)
 #define WCHAR_MAX (0x7fffffff)
 
-typedef int32_t wchar_t;
-typedef uint32_t wint_t;
+#define __need_size_t
+#define __need_wchar_t
+#define __need_wint_t
+#define __need_NULL
 
 #endif /* _BITS_WCHAR_H */

+ 1 - 0
include/stddef.h

@@ -7,6 +7,7 @@
 typedef signed long long ptrdiff_t;
 
 typedef int32_t wchar_t;
+typedef int32_t wint_t;
 
 typedef unsigned long long size_t;
 

+ 2 - 2
src/crti/src/lib.rs

@@ -30,7 +30,7 @@ global_asm!(r#"
     .global _init
     .type _init,%function
     _init:
-        stp x29,x30,[sp,-16]
+        stp x29,x30,[sp,-16]!
         mov x29,sp
         // stp: "stores two doublewords from the first and second argument to memory addressed by addr"
         // Body will be filled in by gcc and ended by crtn.o
@@ -39,7 +39,7 @@ global_asm!(r#"
     .global _fini
     .type _fini,%function
     _fini:
-        stp x29,x30,[sp,-16]
+        stp x29,x30,[sp,-16]!
         mov x29,sp
         // stp: "stores two doublewords from the first and second argument to memory addressed by addr"
         // Body will be filled in by gcc and ended by crtn.o

+ 1 - 0
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;

+ 6 - 0
src/header/sys_auxv/cbindgen.toml

@@ -0,0 +1,6 @@
+include_guard = "_SYS_AUXV_H"
+language = "C"
+style = "Tag"
+
+[enum]
+prefix_with_name = true

+ 11 - 0
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
+}