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 Try to make dbg() printfs realy ELFSIZE in...
details: https://anonhg.NetBSD.org/src/rev/e2963e9963b0
branches: trunk
changeset: 780458:e2963e9963b0
user: martin <martin%NetBSD.org@localhost>
date: Wed Jul 25 22:51:04 2012 +0000
description:
Try to make dbg() printfs realy ELFSIZE independent
diffstat:
libexec/ld.elf_so/map_object.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diffs (56 lines):
diff -r 287535426954 -r e2963e9963b0 libexec/ld.elf_so/map_object.c
--- a/libexec/ld.elf_so/map_object.c Wed Jul 25 22:11:36 2012 +0000
+++ b/libexec/ld.elf_so/map_object.c Wed Jul 25 22:51:04 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: map_object.c,v 1.43 2011/08/13 22:25:20 christos Exp $ */
+/* $NetBSD: map_object.c,v 1.44 2012/07/25 22:51:04 martin Exp $ */
/*
* Copyright 1996 John D. Polstra.
@@ -34,7 +34,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: map_object.c,v 1.43 2011/08/13 22:25:20 christos Exp $");
+__RCSID("$NetBSD: map_object.c,v 1.44 2012/07/25 22:51:04 martin Exp $");
#endif /* not lint */
#include <errno.h>
@@ -185,27 +185,33 @@
if (nsegs < 2)
segs[nsegs] = phdr;
++nsegs;
- dbg(("%s: %s %p phsize %zu", obj->path, "PT_LOAD",
+
+#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;
case PT_PHDR:
phdr_vaddr = phdr->p_vaddr;
phdr_memsz = phdr->p_memsz;
- dbg(("%s: %s %p phsize %zu", obj->path, "PT_PHDR",
+ dbg(("%s: %s %p phsize %" PRImemsz, obj->path, "PT_PHDR",
(void *)(uintptr_t)phdr->p_vaddr, phdr->p_memsz));
break;
case PT_DYNAMIC:
obj->dynamic = (void *)(uintptr_t)phdr->p_vaddr;
- dbg(("%s: %s %p phsize %zu", obj->path, "PT_DYNAMIC",
+ dbg(("%s: %s %p phsize %" PRImemsz, obj->path, "PT_DYNAMIC",
(void *)(uintptr_t)phdr->p_vaddr, phdr->p_memsz));
break;
#if defined(__HAVE_TLS_VARIANT_I) || defined(__HAVE_TLS_VARIANT_II)
case PT_TLS:
phtls = phdr;
- dbg(("%s: %s %p phsize %zu", obj->path, "PT_TLS",
+ dbg(("%s: %s %p phsize %" PRImemsz, obj->path, "PT_TLS",
(void *)(uintptr_t)phdr->p_vaddr, phdr->p_memsz));
break;
#endif
Home |
Main Index |
Thread Index |
Old Index