diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2016-03-20 02:32:41 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2016-03-20 02:32:41 +0000 |
commit | 3924b0c2475a56d000c0c5cae2ca1660a97b489b (patch) | |
tree | d5f23aa4e0c292f35123ecaf9761158d7c5d71e6 /lib/csu/hppa | |
parent | 4621abcf30c5f4ecef9340db8259e51bfabf6529 (diff) |
Rearrange C runtime bits: now that ld.so exports environ and __progname,
move their definitions and initialization in static links to libc.a
Make crt0 always invoke a new func _csu_finish() in libc to process the auxv
and to either register the ld.so cleanup function (in dynamic links) or
initialize environ and __progname and do MC_DISABLE_KBIND (in static links).
In libc, get pagesize from auxv; cache that between getpagesize() and
sysconf(_SC_PAGESIZE)
ok mpi@ "good time" deraadt@
Diffstat (limited to 'lib/csu/hppa')
-rw-r--r-- | lib/csu/hppa/md_init.h | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/csu/hppa/md_init.h b/lib/csu/hppa/md_init.h index 4f316607049..92ccd465850 100644 --- a/lib/csu/hppa/md_init.h +++ b/lib/csu/hppa/md_init.h @@ -1,4 +1,4 @@ -/* $OpenBSD: md_init.h,v 1.8 2016/03/13 18:35:02 guenther Exp $ */ +/* $OpenBSD: md_init.h,v 1.9 2016/03/20 02:32:39 guenther Exp $ */ /* * Copyright (c) 2003 Dale Rahn. All rights reserved. @@ -174,15 +174,3 @@ envp = arginfo->ps_envstr; #define MD_EPROL_LABEL __asm (".export _eprol, entry\n\t.label _eprol") - -#include <sys/syscall.h> -#include <machine/vmparam.h> /* SYSCALLGATE */ -#define MD_DISABLE_KBIND \ -do { \ - register long r1 __asm__("r1") = SYSCALLGATE; \ - register void *arg0 __asm__("r26") = NULL; \ - __asm__ __volatile__ ("ble 4(%%sr7, %%r1) ! ldi %0, %%r22" \ - : \ - : "i" (SYS_kbind), "r" (r1), "r"(arg0) \ - : "r22", "r28", "r29", "cc", "memory"); \ -} while (0) |