* [PATCH] [LIBELF] Print phdr addresses when loading
@ 2007-02-09 19:24 Hollis Blanchard
2007-02-12 10:05 ` Gerd Hoffmann
0 siblings, 1 reply; 3+ messages in thread
From: Hollis Blanchard @ 2007-02-09 19:24 UTC (permalink / raw)
To: Keir Fraser; +Cc: Gerd Hoffmann, xen-devel
# HG changeset patch
# User Hollis Blanchard <hollisb@us.ibm.com>
# Date 1171052336 21600
# Node ID bbbbab538b8802fde10139f0c2ae7307c1ecf812
# Parent f63c8b64840956b95a911387e1de6f76bd3dc3d5
[LIBELF] Print phdr addresses when loading.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
diff -r f63c8b648409 -r bbbbab538b88 xen/common/libelf/libelf-loader.c
--- a/xen/common/libelf/libelf-loader.c Wed Feb 07 18:53:37 2007 -0600
+++ b/xen/common/libelf/libelf-loader.c Fri Feb 09 14:18:56 2007 -0600
@@ -128,6 +128,8 @@ void elf_load_binary(struct elf_binary *
filesz = elf_uval(elf, phdr, p_filesz);
memsz = elf_uval(elf, phdr, p_memsz);
dest = elf_get_ptr(elf, paddr);
+ elf_msg(elf, "%s: phdr %" PRIu64 " at 0x%p -> 0x%p\n",
+ __func__, i, dest, dest + filesz);
memcpy(dest, elf->image + offset, filesz);
memset(dest + filesz, 0, memsz - filesz);
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [LIBELF] Print phdr addresses when loading
2007-02-09 19:24 [PATCH] [LIBELF] Print phdr addresses when loading Hollis Blanchard
@ 2007-02-12 10:05 ` Gerd Hoffmann
2007-02-12 15:46 ` Hollis Blanchard
0 siblings, 1 reply; 3+ messages in thread
From: Gerd Hoffmann @ 2007-02-12 10:05 UTC (permalink / raw)
To: Hollis Blanchard; +Cc: xen-devel
Hollis Blanchard wrote:
> # HG changeset patch
> # User Hollis Blanchard <hollisb@us.ibm.com>
> # Date 1171052336 21600
> # Node ID bbbbab538b8802fde10139f0c2ae7307c1ecf812
> # Parent f63c8b64840956b95a911387e1de6f76bd3dc3d5
> [LIBELF] Print phdr addresses when loading.
elf_parse_binary() prints them already ...
Why print them again?
cheers,
Gerd
--
Gerd Hoffmann <kraxel@suse.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [LIBELF] Print phdr addresses when loading
2007-02-12 10:05 ` Gerd Hoffmann
@ 2007-02-12 15:46 ` Hollis Blanchard
0 siblings, 0 replies; 3+ messages in thread
From: Hollis Blanchard @ 2007-02-12 15:46 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: xen-devel
On Mon, 2007-02-12 at 11:05 +0100, Gerd Hoffmann wrote:
> Hollis Blanchard wrote:
> > # HG changeset patch
> > # User Hollis Blanchard <hollisb@us.ibm.com>
> > # Date 1171052336 21600
> > # Node ID bbbbab538b8802fde10139f0c2ae7307c1ecf812
> > # Parent f63c8b64840956b95a911387e1de6f76bd3dc3d5
> > [LIBELF] Print phdr addresses when loading.
>
> elf_parse_binary() prints them already ...
> Why print them again?
It's not just the address contained in the phdr; it's the address the
phdr is being loaded at. Seeing the calculation of elf_get_ptr() is
important.
--
Hollis Blanchard
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-02-12 15:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-09 19:24 [PATCH] [LIBELF] Print phdr addresses when loading Hollis Blanchard
2007-02-12 10:05 ` Gerd Hoffmann
2007-02-12 15:46 ` Hollis Blanchard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.