From: Geoff Levand <geoffrey.levand@am.sony.com>
To: Simon Horman <horms@verge.net.au>
Cc: kexec@lists.infradead.org
Subject: [patch] kexec: Fix printed symbol value
Date: Mon, 22 Jun 2009 15:08:49 -0700 [thread overview]
Message-ID: <4A4000F1.8040908@am.sony.com> (raw)
Move the print statement so that the variable
value has been assigned before its value is
printed.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
---
index 74c4b35..1d3e22c 100644
--- a/kexec/kexec-elf-rel.c
+++ b/kexec/kexec-elf-rel.c
@@ -402,13 +402,13 @@ int elf_rel_load(struct mem_ehdr *ehdr, struct kexec_info *info,
else {
sec_base = ehdr->e_shdr[sym.st_shndx].sh_addr;
}
+ value = sym.st_value;
+ value += sec_base;
+ value += rel.r_addend;
#ifdef DEBUG
fprintf(stderr, "sym: %s value: %lx addr: %lx\n",
name, value, address);
#endif
- value = sym.st_value;
- value += sec_base;
- value += rel.r_addend;
machine_apply_elf_rel(ehdr, rel.r_type,
(void *)location, address, value);
}
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next reply other threads:[~2009-06-22 22:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-22 22:08 Geoff Levand [this message]
2009-06-23 0:36 ` [patch] kexec: Fix printed symbol value Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A4000F1.8040908@am.sony.com \
--to=geoffrey.levand@am.sony.com \
--cc=horms@verge.net.au \
--cc=kexec@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.