Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/ld.elf_so Fix DEBUG build.
details: https://anonhg.NetBSD.org/src/rev/7068cf6f96a4
branches: trunk
changeset: 788998:7068cf6f96a4
user: skrll <skrll%NetBSD.org@localhost>
date: Sat Aug 03 13:17:05 2013 +0000
description:
Fix DEBUG build.
diffstat:
libexec/ld.elf_so/debug.h | 8 +++++++-
libexec/ld.elf_so/headers.c | 14 +++++++-------
libexec/ld.elf_so/map_object.c | 9 ++-------
3 files changed, 16 insertions(+), 15 deletions(-)
diffs (112 lines):
diff -r cbeaf5335987 -r 7068cf6f96a4 libexec/ld.elf_so/debug.h
--- a/libexec/ld.elf_so/debug.h Sat Aug 03 10:31:52 2013 +0000
+++ b/libexec/ld.elf_so/debug.h Sat Aug 03 13:17:05 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: debug.h,v 1.6 2013/05/06 08:02:20 skrll Exp $ */
+/* $NetBSD: debug.h,v 1.7 2013/08/03 13:17:05 skrll Exp $ */
/*
* Copyright 1996 John D. Polstra.
@@ -55,4 +55,10 @@
# define rdbg(a) ((void) 0)
#endif
+#if ELFSIZE == 64
+#define PRImemsz PRIu64
+#else
+#define PRImemsz PRIu32
#endif
+
+#endif
diff -r cbeaf5335987 -r 7068cf6f96a4 libexec/ld.elf_so/headers.c
--- a/libexec/ld.elf_so/headers.c Sat Aug 03 10:31:52 2013 +0000
+++ b/libexec/ld.elf_so/headers.c Sat Aug 03 13:17:05 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: headers.c,v 1.51 2013/05/06 19:59:29 christos Exp $ */
+/* $NetBSD: headers.c,v 1.52 2013/08/03 13:17:05 skrll Exp $ */
/*
* Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: headers.c,v 1.51 2013/05/06 19:59:29 christos Exp $");
+__RCSID("$NetBSD: headers.c,v 1.52 2013/08/03 13:17:05 skrll Exp $");
#endif /* not lint */
#include <err.h>
@@ -400,7 +400,7 @@
case PT_INTERP:
obj->interp = (const char *)(uintptr_t)vaddr;
- dbg(("headers: %s %p phsize %zu",
+ dbg(("headers: %s %p phsize %" PRImemsz,
"PT_INTERP", (void *)(uintptr_t)vaddr,
ph->p_memsz));
break;
@@ -417,14 +417,14 @@
obj->vaddrbase;
}
++nsegs;
- dbg(("headers: %s %p phsize %zu",
+ dbg(("headers: %s %p phsize %" PRImemsz,
"PT_LOAD", (void *)(uintptr_t)vaddr,
ph->p_memsz));
break;
case PT_DYNAMIC:
obj->dynamic = (Elf_Dyn *)(uintptr_t)vaddr;
- dbg(("headers: %s %p phsize %zu",
+ dbg(("headers: %s %p phsize %" PRImemsz,
"PT_DYNAMIC", (void *)(uintptr_t)vaddr,
ph->p_memsz));
break;
@@ -436,7 +436,7 @@
obj->tlsalign = ph->p_align;
obj->tlsinitsize = ph->p_filesz;
obj->tlsinit = (void *)(uintptr_t)ph->p_vaddr;
- dbg(("headers: %s %p phsize %zu",
+ dbg(("headers: %s %p phsize %" PRImemsz,
"PT_TLS", (void *)(uintptr_t)vaddr,
ph->p_memsz));
break;
@@ -445,7 +445,7 @@
case PT_ARM_EXIDX:
obj->exidx_start = (void *)(uintptr_t)vaddr;
obj->exidx_sz = ph->p_memsz;
- dbg(("headers: %s %p phsize %zu",
+ dbg(("headers: %s %p phsize %" PRImemsz,
"PT_ARM_EXIDX", (void *)(uintptr_t)vaddr,
ph->p_memsz));
break;
diff -r cbeaf5335987 -r 7068cf6f96a4 libexec/ld.elf_so/map_object.c
--- a/libexec/ld.elf_so/map_object.c Sat Aug 03 10:31:52 2013 +0000
+++ b/libexec/ld.elf_so/map_object.c Sat Aug 03 13:17:05 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: map_object.c,v 1.51 2013/05/09 15:38:14 christos Exp $ */
+/* $NetBSD: map_object.c,v 1.52 2013/08/03 13:17:05 skrll Exp $ */
/*
* Copyright 1996 John D. Polstra.
@@ -34,7 +34,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: map_object.c,v 1.51 2013/05/09 15:38:14 christos Exp $");
+__RCSID("$NetBSD: map_object.c,v 1.52 2013/08/03 13:17:05 skrll Exp $");
#endif /* not lint */
#include <errno.h>
@@ -189,11 +189,6 @@
segs[nsegs] = phdr;
++nsegs;
-#if ELFSIZE == 64
-#define PRImemsz PRIu64
-#else
-#define PRImemsz PRIu32
-#endif
dbg(("%s: %s %p phsize %" PRImemsz, obj->path, "PT_LOAD",
(void *)(uintptr_t)phdr->p_vaddr, phdr->p_memsz));
break;
Home |
Main Index |
Thread Index |
Old Index