diff options
| author | tv <tv@NetBSD.org> | 1999-02-27 03:34:05 +0000 |
|---|---|---|
| committer | tv <tv@NetBSD.org> | 1999-02-27 03:34:05 +0000 |
| commit | ff6c8ce5573c1f6616470f5063c9d076ee2e87f0 (patch) | |
| tree | e3c8c3ea0d2d78f40a62dcf3ebb75c848b6dc279 /libexec | |
| parent | 7f2b95a33205aa8a00c3bc11e3f7b7de591b3df7 (diff) | |
Add ld.so hacks for arm32, and reenable ld.aout_so on arm32. As is well
known, XXX this needs a real fix.
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/Makefile | 9 | ||||
| -rw-r--r-- | libexec/ld.aout_so/arch/arm32/md.c | 8 | ||||
| -rw-r--r-- | libexec/ld.aout_so/rtld.c | 10 |
3 files changed, 18 insertions, 9 deletions
diff --git a/libexec/Makefile b/libexec/Makefile index b326a6787b9..8db8b10e69a 100644 --- a/libexec/Makefile +++ b/libexec/Makefile @@ -1,16 +1,11 @@ -# $NetBSD: Makefile,v 1.32 1999/02/12 17:17:57 tv Exp $ +# $NetBSD: Makefile,v 1.33 1999/02/27 03:34:05 tv Exp $ # @(#)Makefile 8.1 (Berkeley) 6/4/93 -.include <bsd.own.mk> # for EXPORTABLE_SYSTEM - -SUBDIR= atrun comsat fingerd ftpd getNAME getty identd \ +SUBDIR= atrun comsat fingerd ftpd getNAME getty identd ld.aout_so \ lfs_cleanerd mail.local makekey makewhatis rexecd rlogind rmail \ rshd rpc.rquotad rpc.rstatd rpc.rusersd rpc.rwalld rpc.sprayd \ talkd telnetd tftpd uucpd -.if (${MACHINE_ARCH} != "arm32") -SUBDIR+=ld.aout_so -.endif .if (${MACHINE_ARCH} != "alpha") SUBDIR+=ld.elf_so .endif diff --git a/libexec/ld.aout_so/arch/arm32/md.c b/libexec/ld.aout_so/arch/arm32/md.c index 7793e3db887..b2a7af12204 100644 --- a/libexec/ld.aout_so/arch/arm32/md.c +++ b/libexec/ld.aout_so/arch/arm32/md.c @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.10 1998/12/17 20:14:44 pk Exp $ */ +/* $NetBSD: md.c,v 1.11 1999/02/27 03:34:05 tv Exp $ */ /* * Copyright (C) 1997 Mark Brinicombe @@ -56,6 +56,8 @@ #endif #ifdef RTLD +__inline void iflush __P((void *addr, int len)); + /* * Flush the instruction cache of the specified address * Some processors have separate instruction caches and @@ -423,7 +425,9 @@ md_swapin_reloc(r, n) struct relocation_info *r; int n; { +#ifdef NEED_SWAP int bits; +#endif for (; n; n--, r++) { #ifdef NEED_SWAP @@ -456,7 +460,9 @@ md_swapout_reloc(r, n) struct relocation_info *r; int n; { +#ifdef NEED_SWAP int bits; +#endif for (; n; n--, r++) { /* Look for jmptable relocation */ diff --git a/libexec/ld.aout_so/rtld.c b/libexec/ld.aout_so/rtld.c index 90ed80c71b1..eb1ce52e5ed 100644 --- a/libexec/ld.aout_so/rtld.c +++ b/libexec/ld.aout_so/rtld.c @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.c,v 1.72 1999/01/28 23:58:49 fvdl Exp $ */ +/* $NetBSD: rtld.c,v 1.73 1999/02/27 03:34:05 tv Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -875,6 +875,10 @@ reloc_map(smp) sym = stringbase + p->nz_strx; +#if defined(__arm32__) && 1 /* XXX MAGIC! */ + if (r->r_baserel && r->r_length == 2) + relocation = 0; +#endif np = lookup(sym, smp, &src_map, 0/*XXX-jumpslots!*/); if (np == NULL) errx(1, "Undefined symbol \"%s\" in %s:%s\n", @@ -962,7 +966,11 @@ call_map(smp, sym) #if DEBUG xprintf("call_map: %s at %#x+%#x enter\n", sym, src_map->som_addr, np->nz_value); #endif +#if defined(__arm32__) && 1 /* XXX MAGIC! */ + (*(void (*) __P((u_int)))(src_map->som_addr + np->nz_value))((u_int)src_map->som_addr); +#else (*(void (*) __P((void)))(src_map->som_addr + np->nz_value))(); +#endif #if DEBUG xprintf("call_map: %s at %#x+%#x exit\n", sym, src_map->som_addr, np->nz_value); #endif |
