All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] kexec: Fix printed symbol value
@ 2009-06-22 22:08 Geoff Levand
  2009-06-23  0:36 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Geoff Levand @ 2009-06-22 22:08 UTC (permalink / raw)
  To: Simon Horman; +Cc: kexec

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-23  0:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-22 22:08 [patch] kexec: Fix printed symbol value Geoff Levand
2009-06-23  0:36 ` Simon Horman

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.