From 3924b0c2475a56d000c0c5cae2ca1660a97b489b Mon Sep 17 00:00:00 2001 From: Philip Guenther Date: Sun, 20 Mar 2016 02:32:41 +0000 Subject: 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@ --- lib/csu/hppa/md_init.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'lib/csu/hppa') 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 -#include /* 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) -- cgit v1.2.3