diff options
author | 2014-12-27 20:33:47 +0000 | |
---|---|---|
committer | 2014-12-27 20:33:47 +0000 | |
commit | a05b67b7159ccee69d91364137da3e35fc81f147 (patch) | |
tree | d160943bd521495ca8e253d3f74ebe9a95f03fd6 /lib/csu | |
parent | encrypt should easily fit onto the media now. this will be done step by step. (diff) | |
download | wireguard-openbsd-a05b67b7159ccee69d91364137da3e35fc81f147.tar.xz wireguard-openbsd-a05b67b7159ccee69d91364137da3e35fc81f147.zip |
Static PIE for mips64. Still something not quite right as a full make build
fails.
ok kurt@
Diffstat (limited to 'lib/csu')
-rw-r--r-- | lib/csu/mips64/md_init.h | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/lib/csu/mips64/md_init.h b/lib/csu/mips64/md_init.h index 2bc75ae7914..291654966a4 100644 --- a/lib/csu/mips64/md_init.h +++ b/lib/csu/mips64/md_init.h @@ -1,4 +1,4 @@ -/* $OpenBSD: md_init.h,v 1.7 2014/12/23 16:27:18 deraadt Exp $ */ +/* $OpenBSD: md_init.h,v 1.8 2014/12/27 20:33:47 kettenis Exp $ */ /*- * Copyright (c) 2001 Ross Harvey @@ -105,6 +105,49 @@ " .end __start \n" \ " .previous") +#define MD_RCRT0_START \ + __asm( \ + ".text \n" \ + " .align 3 \n" \ + " .globl __start \n" \ + " .ent __start \n" \ + " .type __start, @function \n" \ + "__start: \n" \ + " dsubu $sp, $sp, 160 \n" \ + " .cpsetup $t9, 144, __start \n" \ + " dla $s1, 1f \n" \ + " bgezal $zero, 1f \n" \ + "1: \n" \ + " dsubu $s0, $ra, $s1 \n" \ + " daddu $a0, $sp, 160 \n" \ + " daddu $a1, $sp, 0 \n" \ + " dla $t9, _dl_boot_bind \n" \ + " daddu $t9, $s0 \n" \ + " jalr $t9 \n" \ + " daddu $sp, $sp, 160 \n" \ + " move $a0, $sp \n" \ + " dsrl $a1, $sp, 4 \n" /* align stack on a */ \ + " dsll $sp, $a1, 4 \n" /* 16 byte boundary */ \ + " move $a1, $zero \n" \ + " dla $t9, ___start \n" \ + " jr $t9 \n" \ + " .end __start \n" \ + " .globl _dl_exit \n" \ + " .ent _dl_exit \n" \ + " .type _dl_exit, @function \n" \ + "_dl_exit: \n" \ + " li $v0, 1 \n" \ + " syscall \n" \ + " j $ra \n" \ + " .end _dl_exit \n" \ + " .globl _dl_printf \n" \ + " .ent _dl_printf \n" \ + " .type _dl_printf, @function \n" \ + "_dl_printf: \n" \ + " j $ra \n" \ + " .end _dl_printf \n" \ + " .previous") + struct kframe { long kargc; char *kargv[1]; /* size depends on kargc */ |