diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2003-05-30 01:13:54 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2003-05-30 01:13:54 +0000 |
commit | e0412874e2e423e326125c2e936d4d27d7f2e87b (patch) | |
tree | a812a7dd7f9a4d94243a97d3947e66fe9d372314 /libexec/ld.so/sparc64/ldasm.S | |
parent | 441e1efd56d21b17558bc2e2803d3409279c359b (diff) |
When loading a shared object or libraries dependant object, load them
in random order. This will reduce the possiblity of a buffer overflow
being able to predict the addresss of useful code. Can be disabled
with the LD_NORANDOM environment variable for debugging purposes.
ok deraadt.
Diffstat (limited to 'libexec/ld.so/sparc64/ldasm.S')
-rw-r--r-- | libexec/ld.so/sparc64/ldasm.S | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libexec/ld.so/sparc64/ldasm.S b/libexec/ld.so/sparc64/ldasm.S index 43c53c92eb4..4157eadcb99 100644 --- a/libexec/ld.so/sparc64/ldasm.S +++ b/libexec/ld.so/sparc64/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.17 2003/02/02 16:57:58 deraadt Exp $ */ +/* $OpenBSD: ldasm.S,v 1.18 2003/05/30 01:13:53 drahn Exp $ */ /* $NetBSD: rtld_start.S,v 1.5 2001/08/14 22:17:48 eeh Exp $ */ /* @@ -384,3 +384,15 @@ _dl_sigprocmask: 1: retl clr %o0 + + + .section ".text" + .align 4 + .globl _dl_sysctl + .type _dl_sysctl,@function +_dl_sysctl: + mov SYS___sysctl | SYSCALL_G2RFLAG, %g1 ! call sys_getdirentries + add %o7, 8, %g2 ! just return on success + t ST_SYSCALL ! off to wonderland + retl + sub %g0, %o0, %o0 ! error: result = -errno |