diff options
author | 2015-01-01 19:43:10 +0000 | |
---|---|---|
committer | 2015-01-01 19:43:10 +0000 | |
commit | c481a69c703a2df1bdd8732e8a64335781d733d3 (patch) | |
tree | 6270441797da9016a641df3767c4d605f1ef8df9 /lib | |
parent | Fix a buffer overrun triggered by a trailing backslash at EOF in (diff) | |
download | wireguard-openbsd-c481a69c703a2df1bdd8732e8a64335781d733d3.tar.xz wireguard-openbsd-c481a69c703a2df1bdd8732e8a64335781d733d3.zip |
Inline the .cpsetup pseudo-statement in rcrt0 to avoid saving the "old" gp
value, which we have no use for. ok kettenis@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/csu/mips64/md_init.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/csu/mips64/md_init.h b/lib/csu/mips64/md_init.h index 291654966a4..51adb989adc 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.8 2014/12/27 20:33:47 kettenis Exp $ */ +/* $OpenBSD: md_init.h,v 1.9 2015/01/01 19:43:10 miod Exp $ */ /*- * Copyright (c) 2001 Ross Harvey @@ -114,7 +114,9 @@ " .type __start, @function \n" \ "__start: \n" \ " dsubu $sp, $sp, 160 \n" \ - " .cpsetup $t9, 144, __start \n" \ + " lui $gp, %hi(%neg(%gp_rel(__start))) \n" \ + " addiu $gp, $gp, %lo(%neg(%gp_rel(__start))) \n" \ + " daddu $gp, $gp, $t9 \n" \ " dla $s1, 1f \n" \ " bgezal $zero, 1f \n" \ "1: \n" \ |