summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2010-08-16 13:04:52 +0000
committerkettenis <kettenis@openbsd.org>2010-08-16 13:04:52 +0000
commit738f7fb443428ab0808932f27f81f3a3a4aa1f34 (patch)
treeb5b7d97ef733c3ba146bd88e11f26d6bc8bea980 /sys
parentFix another gcc4 mis-alignment, by using bcopy() rather than (diff)
downloadwireguard-openbsd-738f7fb443428ab0808932f27f81f3a3a4aa1f34.tar.xz
wireguard-openbsd-738f7fb443428ab0808932f27f81f3a3a4aa1f34.zip
Add a dummy elf64.c, effectively removing support for loading 64-bit kernels
from cdboot to slim it down below the 32k limit.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/hppa/stand/cdboot/elf64.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/sys/arch/hppa/stand/cdboot/elf64.c b/sys/arch/hppa/stand/cdboot/elf64.c
new file mode 100644
index 00000000000..006d7f03b9a
--- /dev/null
+++ b/sys/arch/hppa/stand/cdboot/elf64.c
@@ -0,0 +1,36 @@
+/* $OpenBSD: elf64.c,v 1.1 2010/08/16 13:04:52 kettenis Exp $ */
+
+/*
+ * Copyright (c) 2010 Mark Kettenis
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <lib/libkern/libkern.h>
+#include <lib/libsa/stand.h>
+
+#include <sys/param.h>
+#include <sys/exec.h>
+
+#include "../../../../lib/libsa/loadfile.h"
+
+#undef ELFSIZE
+#define ELFSIZE 64
+
+#include <sys/exec_elf.h>
+
+int
+ELFNAME(exec)(int fd, Elf_Ehdr *elf, u_long *marks, int flags)
+{
+ return 1;
+}