Displaying 4 results from an estimated 4 matches for "at_pagesz".
Did you mean:
at_pages
2014 Jan 25
0
[klibc:master] auxv: convert auxiliary vector into an array; define getauxval()
...t argc;
@@ -76,20 +79,16 @@ __noreturn __libc_init(uintptr_t * elfdata, void (*onexit) (void))
auxentry = (struct auxentry *)(envend + 1);
while (auxentry->type) {
- switch (auxentry->type) {
-#if SHARED
- case AT_ENTRY:
- MAIN = (main_t) (auxentry->v);
- break;
-#endif
- case AT_PAGESZ:
- page_size = (unsigned int)(auxentry->v);
- break;
- }
+ if (auxentry->type < _AUXVAL_MAX)
+ __auxval[auxentry->type] = auxentry->v;
auxentry++;
}
- __page_size = page_size;
+#if SHARED
+ MAIN = (main_t) __auxval[AT_ENTRY];
+#endif
+
+ __page_size = page_size = __aux...
2014 Jan 25
0
[klibc:master] i386: use the vdso for system calls on i386
...cmpl $-4095, %eax
jae 1f
diff --git a/usr/klibc/libc_init.c b/usr/klibc/libc_init.c
index 1087f95..1c6180b 100644
--- a/usr/klibc/libc_init.c
+++ b/usr/klibc/libc_init.c
@@ -90,6 +90,15 @@ __noreturn __libc_init(uintptr_t * elfdata, void (*onexit) (void))
__page_size = page_size = __auxval[AT_PAGESZ];
+#ifdef __i386__
+ {
+ extern void (*__syscall_entry)(int, ...);
+ if (__auxval[AT_SYSINFO])
+ __syscall_entry = (void (*)(int, ...))
+ __auxval[AT_SYSINFO];
+ }
+#endif
+
#if __GNUC__ >= 4
/* unsigned int is 32 bits on all our architectures */
page_shift = __builtin_clz(page_siz...
2014 Apr 09
0
[klibc:master] Move architecture-specific initialization to arch/
...unsigned long v;
};
-extern void __init_stdio(void);
+extern void __libc_init_stdio(void);
+extern void __libc_archinit(void);
unsigned long __auxval[_AUXVAL_MAX];
@@ -90,20 +92,11 @@ __noreturn __libc_init(uintptr_t * elfdata, void (*onexit) (void))
__page_size = page_size = __auxval[AT_PAGESZ];
-#ifdef __i386__
- {
- extern void (*__syscall_entry)(int, ...);
- if (__auxval[AT_SYSINFO])
- __syscall_entry = (void (*)(int, ...))
- __auxval[AT_SYSINFO];
- }
-#endif
-
#if __GNUC__ >= 4
/* unsigned int is 32 bits on all our architectures */
page_shift = __builtin_clz(page_siz...
2012 Jan 29
5
[PATCH 0/2 v3] mkstemp() and m68k support
Hi,
after a year, I decided to hack on klibc again. I?ve reworked
both the patch to add mkstemp(), discussing to use AT_RANDOM
as cheap entropy source on IRC (if there will ever be another
entropy consumer, I can quickly write a minimal arc4random()
seeded from it, as it has only 16 octets), capable of making
a working mksh (static and shared) on amd64/xen, and the m68k
support code, leading to