summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>1999-03-03 21:18:00 +0000
committerchristos <christos@NetBSD.org>1999-03-03 21:18:00 +0000
commitec2edc19fde3370a188773de76dd9ab67c81e501 (patch)
treef0b3de0b7faacffd441afe3e435f37cbef0d44ab
parent6b8842ab8e8bb01efa311039e5912ddaffd46223 (diff)
Make this compile without -DRTLD_LOADER and fix printf format problems on
the alpha.
-rw-r--r--libexec/ld.elf_so/Makefile3
-rw-r--r--libexec/ld.elf_so/malloc.c4
-rw-r--r--libexec/ld.elf_so/reloc.c6
-rw-r--r--libexec/ld.elf_so/rtld.c4
-rw-r--r--libexec/ld.elf_so/xprintf.c4
5 files changed, 10 insertions, 11 deletions
diff --git a/libexec/ld.elf_so/Makefile b/libexec/ld.elf_so/Makefile
index 82e0e0b9c1e..a2fbc81c5fc 100644
--- a/libexec/ld.elf_so/Makefile
+++ b/libexec/ld.elf_so/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 1999/03/03 12:00:19 jonathan Exp $
+# $NetBSD: Makefile,v 1.24 1999/03/03 21:18:00 christos Exp $
.include <bsd.own.mk> # for OBJECT_FMT definition
@@ -30,7 +30,6 @@ CPPFLAGS+= -DDEBUG -DRTLD_LOADER
LDADD+= -L${DESTDIR}/${LIBDIR} -L${CLIBOBJ} -non_shared -lc_pic
DPADD+= ${LIBC_PIC}
-CFLAGS+=-g
.if (${OBJECT_FMT} == "ELF")
# to be installed
diff --git a/libexec/ld.elf_so/malloc.c b/libexec/ld.elf_so/malloc.c
index 4c791899672..1967fd46270 100644
--- a/libexec/ld.elf_so/malloc.c
+++ b/libexec/ld.elf_so/malloc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: malloc.c,v 1.3 1999/03/01 16:40:07 christos Exp $ */
+/* $NetBSD: malloc.c,v 1.4 1999/03/03 21:18:00 christos Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -134,8 +134,6 @@ botch(
#define ASSERT(p)
#endif
-/* Polstra's debugging stuff */
-extern void xprintf(const char *, ...);
#define TRACE() xprintf("TRACE %s:%d\n", __FILE__, __LINE__)
void *
diff --git a/libexec/ld.elf_so/reloc.c b/libexec/ld.elf_so/reloc.c
index c80572c3418..c81d86eb211 100644
--- a/libexec/ld.elf_so/reloc.c
+++ b/libexec/ld.elf_so/reloc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: reloc.c,v 1.17 1999/03/03 12:20:00 jonathan Exp $ */
+/* $NetBSD: reloc.c,v 1.18 1999/03/03 21:18:00 christos Exp $ */
/*
* Copyright 1996 John D. Polstra.
@@ -92,9 +92,9 @@ _rtld_do_copy_relocation(dstobj, rela, dodebug)
}
srcaddr = (const void *)(srcobj->relocbase + srcsym->st_value);
(void)memcpy(dstaddr, srcaddr, size);
- rdbg(dodebug, ("COPY %s %s %s --> src=%p dst=%p *dst= %p size %d",
+ rdbg(dodebug, ("COPY %s %s %s --> src=%p dst=%p *dst= %p size %ld",
dstobj->path, srcobj->path, name, (void *)srcaddr,
- (void *)dstaddr, (void *)*(long *)dstaddr, size));
+ (void *)dstaddr, (void *)*(long *)dstaddr, (long)size));
return (0);
}
#endif /* RTLD_INHIBIT_COPY_RELOCS */
diff --git a/libexec/ld.elf_so/rtld.c b/libexec/ld.elf_so/rtld.c
index 78d0723d026..0209f36ee9c 100644
--- a/libexec/ld.elf_so/rtld.c
+++ b/libexec/ld.elf_so/rtld.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rtld.c,v 1.15 1999/03/01 16:40:07 christos Exp $ */
+/* $NetBSD: rtld.c,v 1.16 1999/03/03 21:18:00 christos Exp $ */
/*
* Copyright 1996 John D. Polstra.
@@ -263,7 +263,7 @@ _rtld(sp)
/* Find the auxiliary vector on the stack. */
/* first Elf_Word reserved to address of exit routine */
#if defined(RTLD_DEBUG) && !defined(RTLD_RELOCATE_SELF)
- dbg(("sp = %p, argc = %d, argv = %p <%s>\n", sp, sp[2],
+ dbg(("sp = %p, argc = %ld, argv = %p <%s>\n", sp, (long)sp[2],
&sp[3], (char *) sp[3]));
dbg(("got is at %p, dynamic is at %p\n",
_GLOBAL_OFFSET_TABLE_, &_DYNAMIC));
diff --git a/libexec/ld.elf_so/xprintf.c b/libexec/ld.elf_so/xprintf.c
index 2f18612f4fe..bcc6f11f87c 100644
--- a/libexec/ld.elf_so/xprintf.c
+++ b/libexec/ld.elf_so/xprintf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: xprintf.c,v 1.4 1999/03/01 16:40:08 christos Exp $ */
+/* $NetBSD: xprintf.c,v 1.5 1999/03/03 21:18:01 christos Exp $ */
/*
* Copyright 1996 Matt Thomas <matt@3am-software.com>
@@ -38,6 +38,7 @@
#include <varargs.h>
#endif
+#ifdef RTLD_LOADER
#define SZ_SHORT 0x01
#define SZ_INT 0x02
#define SZ_LONG 0x04
@@ -382,3 +383,4 @@ xassert(file, line, failedexpr)
abort();
/* NOTREACHED */
}
+#endif