summaryrefslogtreecommitdiff
path: root/libexec/ld.so
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2002-08-11 18:41:18 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2002-08-11 18:41:18 +0000
commit7ae1406576732e93c719d29fc612ad481d1b9acb (patch)
tree418f854daf518c2dfbea4d539e42737e8ed7ee1e /libexec/ld.so
parentcf12fd91c3ab31fc23c40794cea2a00487bda01e (diff)
The parameter dynp was never used, rather than pass in a dummy on most
archs and a nasty calcuation on others, remove the parameter.
Diffstat (limited to 'libexec/ld.so')
-rw-r--r--libexec/ld.so/alpha/ldasm.S11
-rw-r--r--libexec/ld.so/loader.c6
-rw-r--r--libexec/ld.so/powerpc/ldasm.S5
-rw-r--r--libexec/ld.so/sparc/ldasm.S10
-rw-r--r--libexec/ld.so/sparc64/ldasm.S8
5 files changed, 19 insertions, 21 deletions
diff --git a/libexec/ld.so/alpha/ldasm.S b/libexec/ld.so/alpha/ldasm.S
index 56f04962486..cc4eac26afa 100644
--- a/libexec/ld.so/alpha/ldasm.S
+++ b/libexec/ld.so/alpha/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.8 2002/07/12 20:18:30 drahn Exp $ */
+/* $OpenBSD: ldasm.S,v 1.9 2002/08/11 18:41:17 drahn Exp $ */
/*
* Copyright (c) 2001 Niklas Hallqvist
@@ -102,11 +102,10 @@ L3:
lda s2, 0(sp)
mov s2, a3
CALL(_dl_boot_bind)
- mov s3, a0
- mov s4, a1
- mov s1, a2
- mov s5, a3
- mov s2, a4
+ mov s3, a0 /* **argv */
+ mov s4, a1 /* **envp */
+ mov s1, a2 /* loff */
+ mov s2, a3 /* dl_data */
CALL(_dl_boot)
mov s0, a0
mov v0, pv
diff --git a/libexec/ld.so/loader.c b/libexec/ld.so/loader.c
index 333a720625c..9fba86b56a2 100644
--- a/libexec/ld.so/loader.c
+++ b/libexec/ld.so/loader.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: loader.c,v 1.45 2002/08/11 16:51:04 drahn Exp $ */
+/* $OpenBSD: loader.c,v 1.46 2002/08/11 18:41:17 drahn Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -124,13 +124,13 @@ _dl_dopreload(paths)
* to do is to dig out all information we need to accomplish our task.
*/
unsigned long
-_dl_boot(const char **argv, char **envp, const long loff,
- Elf_Dyn *dynp, long *dl_data)
+_dl_boot(const char **argv, char **envp, const long loff, long *dl_data)
{
struct elf_object *exe_obj; /* Pointer to executable object */
struct elf_object *dyn_obj; /* Pointer to executable object */
struct r_debug **map_link; /* Where to put pointer for gdb */
struct r_debug *debug_map;
+ Elf_Dyn *dynp;
elf_object_t *dynobj;
Elf_Phdr *phdp;
char *us = "";
diff --git a/libexec/ld.so/powerpc/ldasm.S b/libexec/ld.so/powerpc/ldasm.S
index caf43ea950b..8bcf48d17b9 100644
--- a/libexec/ld.so/powerpc/ldasm.S
+++ b/libexec/ld.so/powerpc/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.5 2002/07/07 08:54:50 jufi Exp $ */
+/* $OpenBSD: ldasm.S,v 1.6 2002/08/11 18:41:17 drahn Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -129,8 +129,7 @@ ENTRY(_dl_start)
mr 3, 21 # argv
mr 4, 22 # envp
mr 5, 17 # loff
- mr 6, 18 # dynamicp
- addi 7, 1, 8 # dl_data
+ addi 6, 1, 8 # dl_data
bl _dl_boot@local
diff --git a/libexec/ld.so/sparc/ldasm.S b/libexec/ld.so/sparc/ldasm.S
index a003cee0025..785a08b6868 100644
--- a/libexec/ld.so/sparc/ldasm.S
+++ b/libexec/ld.so/sparc/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.4 2002/07/29 15:20:38 art Exp $ */
+/* $OpenBSD: ldasm.S,v 1.5 2002/08/11 18:41:17 drahn Exp $ */
/*
* Copyright (c) 2001 Jason L. Wright (jason@thought.net)
@@ -91,18 +91,18 @@ _dl_start:
call _dl_boot_bind ! _dl_boot_bind(sp,loff,dynp,dl_data)
mov %l3, %o3
- mov %l3, %o4
+ mov %l3, %o3
ld [%l0], %l3 ! argc = *sp
sll %l3, 2, %l3 ! argc *= sizeof(long)
add %l0, 4, %o0 ! argv = [sp + argc]
add %l0, 8, %o1 ! envp = sp + 8 +
add %o1, %l3, %o1 ! + argc
- add %o4, (7*4), %l2
+ add %o3, (7*4), %l2
ld [%l2], %o2 ! loff = dl_data[AUX_base];
- call _dl_boot ! _dl_boot(argv,envp,loff,dynp,dl_data)
- mov 0, %o3 ! dynp = 0
+ call _dl_boot ! _dl_boot(argv,envp,loff,dl_data)
+ nop
add %sp, DL_DATA_SIZE, %sp ! restore stack
diff --git a/libexec/ld.so/sparc64/ldasm.S b/libexec/ld.so/sparc64/ldasm.S
index eda57732c0e..190778e0c54 100644
--- a/libexec/ld.so/sparc64/ldasm.S
+++ b/libexec/ld.so/sparc64/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.12 2002/07/12 20:18:30 drahn Exp $ */
+/* $OpenBSD: ldasm.S,v 1.13 2002/08/11 18:41:17 drahn Exp $ */
/* $NetBSD: rtld_start.S,v 1.5 2001/08/14 22:17:48 eeh Exp $ */
/*
@@ -109,18 +109,18 @@ _dl_start:
call _dl_boot_bind ! _dl_boot_bind(sp,loff,dynp,dl_data)
mov %l3, %o3
- mov %l3, %o4
+ mov %l3, %o3
ldx [%l0], %l3 ! argc = *sp
sllx %l3, 3, %l3 ! argc *= sizeof(long)
addx %l0, 8, %o0 ! argv = [sp + argc]
addx %l0, 16, %o1 ! envp = sp + 16 +
addx %o1, %l3, %o1 ! + argc
- addx %o4, (7*8), %l2
+ addx %o3, (7*8), %l2
ldx [%l2], %o2 ! loff = dl_data[AUX_base];
call _dl_boot ! _dl_boot(argv,envp,loff,dynp,dl_data)
- mov 0, %o3 ! dynp = 0
+ nop
add %sp, DL_DATA_SIZE, %sp ! restore stack
mov %l1, %g1 ! restore ps_strings