summaryrefslogtreecommitdiff
path: root/libexec/ld.so/sparc/ldasm.S
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2014-07-06 07:28:37 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2014-07-06 07:28:37 +0000
commitccea032754da70850b396992bada9aad229e7ce1 (patch)
treea6b2bb328e62c4273c2e62d30c575fcbca0af08f /libexec/ld.so/sparc/ldasm.S
parent4aa0b086cfa4b91bee4edef283fc98dcdc1594b0 (diff)
move from sysclt(KERN_ARND) to getentropy(2); ok miod@, kettenis@
Diffstat (limited to 'libexec/ld.so/sparc/ldasm.S')
-rw-r--r--libexec/ld.so/sparc/ldasm.S14
1 files changed, 13 insertions, 1 deletions
diff --git a/libexec/ld.so/sparc/ldasm.S b/libexec/ld.so/sparc/ldasm.S
index 17112f54374..cae76daf1ab 100644
--- a/libexec/ld.so/sparc/ldasm.S
+++ b/libexec/ld.so/sparc/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.22 2013/12/25 11:10:02 kettenis Exp $ */
+/* $OpenBSD: ldasm.S,v 1.23 2014/07/06 07:28:36 otto Exp $ */
/*
* Copyright (c) 2001 Jason L. Wright (jason@thought.net)
@@ -371,6 +371,18 @@ _dl_utrace:
retl
sub %g0, %o0, %o0 ! error: result = -errno
+
+ .section ".text"
+ .align 4
+ .global _dl_getentropy
+ .type _dl_getentropy,@function
+_dl_getentropy:
+ mov SYS_getentropy | SYSCALL_G2RFLAG, %g1 ! calling sys_getentropy
+ add %o7, 8, %g2 ! just return on success
+ t ST_SYSCALL ! off to wonderland
+ retl
+ sub %g0, %o0, %o0 ! error: result = -errno
+
/*
* V8 sparc .{,u}{mul,div,rem} replacements.
* We try to mimic them 100%. Full 64 bit sources or outputs, and