diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2001-09-24 21:35:10 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2001-09-24 21:35:10 +0000 |
commit | b3d7af781849c849e8cc82591dedf3ad8627bc40 (patch) | |
tree | 09d9f188a992e209168c86aac68b3b47aa46fcec /libexec | |
parent | 080ff1779f6b27a277983e52d30efaa7ae46e99d (diff) |
API change between asm code and _dl_boot_bind(). Simply and
reduce number of parameters. Alpha changes coming shortly.
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ld.so/loader.c | 18 | ||||
-rw-r--r-- | libexec/ld.so/powerpc/ldasm.S | 13 |
2 files changed, 14 insertions, 17 deletions
diff --git a/libexec/ld.so/loader.c b/libexec/ld.so/loader.c index 007fd088eb5..17b1c646726 100644 --- a/libexec/ld.so/loader.c +++ b/libexec/ld.so/loader.c @@ -1,4 +1,4 @@ -/* $OpenBSD: loader.c,v 1.19 2001/09/22 04:58:18 drahn Exp $ */ +/* $OpenBSD: loader.c,v 1.20 2001/09/24 21:35:09 drahn Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -246,7 +246,7 @@ _dl_boot(const char **argv, const char **envp, const long loff, /* * Finally make something to help gdb when poking around in the code. */ -#if defined(__powerpc__) || defined(__alpha__) +#if defined(__powerpc__) || defined(__alpha__) || defined(__sparc64__) debug_map = (struct r_debug *)_dl_malloc(sizeof(*debug_map)); debug_map->r_version = 1; debug_map->r_map = (struct link_map *)_dl_objects; @@ -302,26 +302,26 @@ _dl_boot(const char **argv, const char **envp, const long loff, void -_dl_boot_bind(const long sp, const long loff, int argc, const char **argv, - const char **envp, Elf_Dyn *dynamicp, long *dl_data) +_dl_boot_bind(const long sp, const long loff, Elf_Dyn *dynamicp, long *dl_data) { AuxInfo *auxstack; long *stack; Elf_Dyn *dynp; int n; - + int argc; + char **argv; + char **envp; + struct elf_object dynld; /* Resolver data for the loader */ /* * Scan argument and environment vectors. Find dynamic * data vector put after them. */ -#ifdef _mips_ stack = (long *)sp; argc = *stack++; - argv = (const char **)stack; + argv = (char **)stack; envp = &argv[argc + 1]; -#endif /* _mips_ */ stack = (long *)envp; while(*stack++ != NULL) {}; @@ -347,7 +347,7 @@ _dl_boot_bind(const long sp, const long loff, int argc, const char **argv, * Cache the data for easier access. */ -#if defined(__powerpc__) || defined(__alpha__) +#if defined(__powerpc__) || defined(__alpha__) || defined(__sparc64__) dynp = dynamicp; #else dynp = (Elf_Dyn *)((long)_DYNAMIC + loff); diff --git a/libexec/ld.so/powerpc/ldasm.S b/libexec/ld.so/powerpc/ldasm.S index 34a674fe0fe..6b2542315be 100644 --- a/libexec/ld.so/powerpc/ldasm.S +++ b/libexec/ld.so/powerpc/ldasm.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ldasm.S,v 1.1 2000/06/13 03:40:35 rahnds Exp $ */ +/* $OpenBSD: ldasm.S,v 1.2 2001/09/24 21:35:09 drahn Exp $ */ /* * Copyright (c) 1999 Dale Rahn @@ -47,7 +47,7 @@ ENTRY(_dl_start) mr 19, 1 - stwu 1, (-16 -((AUX_entry+1)*4))(1) # Some space. + stwu 1, (-16 -((AUX_entry+3)*4))(1) # Some space. mflr 27 /* save off old link register */ stw 27, 4(19) /* save in normal location */ @@ -119,13 +119,10 @@ ENTRY(_dl_start) mr 17, 4 - mr 3, 19 # Get stack pointer (arg0 for _dl_boot). + subi 3, 21, 4 # Get stack pointer (arg0 for _dl_boot). mr 4, 17 # loff - mr 5, 20 # argc - mr 6, 21 # argv - mr 7, 22 # envp - mr 8, 18 # dynamicp - addi 9, 1, 8 # dl_data + mr 5, 18 # dynamicp + addi 6, 1, 8 # dl_data bl _dl_boot_bind@local |