diff options
author | Per Fogelstrom <pefo@cvs.openbsd.org> | 1996-09-23 18:58:59 +0000 |
---|---|---|
committer | Per Fogelstrom <pefo@cvs.openbsd.org> | 1996-09-23 18:58:59 +0000 |
commit | d5fd65a8580ab7791a1c0b8a4f8d24eec822238e (patch) | |
tree | c4353a4ccd0666e6e816992e404132b0dc1a5555 /gnu/libexec | |
parent | 62caebdfe5e043d9fcb123b3e722959df3e3111b (diff) |
Fixes to avoid using asm to get pointer to start sp in ld.so. It's a little
hackish but doesn't add any machdep stuff to MI code.
Also don't strip when installing ld.so.
Diffstat (limited to 'gnu/libexec')
-rw-r--r-- | gnu/libexec/ld.so/ld.so/Makefile | 5 | ||||
-rw-r--r-- | gnu/libexec/ld.so/ld.so/boot1.c | 9 | ||||
-rw-r--r-- | gnu/libexec/ld.so/ld.so/mips/sysdep.h | 2 |
3 files changed, 10 insertions, 6 deletions
diff --git a/gnu/libexec/ld.so/ld.so/Makefile b/gnu/libexec/ld.so/ld.so/Makefile index 3ea83da0769..53628b8e0f3 100644 --- a/gnu/libexec/ld.so/ld.so/Makefile +++ b/gnu/libexec/ld.so/ld.so/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 1996/09/18 08:15:23 pefo Exp $ +# $OpenBSD: Makefile,v 1.2 1996/09/23 18:58:55 pefo Exp $ SUBDIR= # libdl @@ -9,13 +9,14 @@ SRCS= boot1.c hash.c readelflib1.c vsprintf.c elfinterp.c PROG= ld.so MAN= ld.so.8 BINDIR=/usr/libexec +STRIP= .PATH: ${MACHINE_ARCH} ELF_LDFLAGS=--shared # using GNU ld $(PROG): - $(LD) -x -e _dl_boot $(ELF_LDFLAGS) -o $(DLINKER) $(OBJS) + $(LD) -x -e _dl_boot $(ELF_LDFLAGS) -o $(PROG) $(OBJS) .include <bsd.prog.mk> diff --git a/gnu/libexec/ld.so/ld.so/boot1.c b/gnu/libexec/ld.so/ld.so/boot1.c index 9b2d78d50dc..96043814122 100644 --- a/gnu/libexec/ld.so/ld.so/boot1.c +++ b/gnu/libexec/ld.so/ld.so/boot1.c @@ -170,9 +170,12 @@ static void _dl_debug_state() return; } -void _dl_boot(void); +/* + * XXX The following function declaration is a HACK to make this work + * without asm code for the MIPS processors. Don't ask why... :-) + */ -void _dl_boot() +void _dl_boot(void *a0, void *a1, void *a2, void *a3, void *a4) { unsigned int argc; char ** argv, ** envp; @@ -199,7 +202,7 @@ void _dl_boot() what binary is loaded, where it is loaded, etc, etc */ - GET_ARGV(aux_dat, 0); + GET_ARGV(aux_dat, a0); stack = aux_dat; /* Remember this for start later */ argc = *(aux_dat); diff --git a/gnu/libexec/ld.so/ld.so/mips/sysdep.h b/gnu/libexec/ld.so/ld.so/mips/sysdep.h index 52d3f874197..53d3cb36641 100644 --- a/gnu/libexec/ld.so/ld.so/mips/sysdep.h +++ b/gnu/libexec/ld.so/ld.so/mips/sysdep.h @@ -9,7 +9,7 @@ just the address if the first argument, on other platforms we need to do something a little more subtle here. */ #define GET_ARGV(ARGVP, ARGS) \ - asm(" addiu %0,$29,328" : "=r" (ARGVP)) + ARGVP = ((unsigned int*) & a4 - 4 ); /* Get the address of the Global offset table. This must be absolute, not relative. This is already set up on mips */ |