From: Corey J. Boyle Date: Sat, 5 Oct 2013 11:46:31 +0000 (-0400) Subject: flatload: fix non-GOT relocations X-Git-Tag: v2.0.0-rc0~202^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9721cf2cd6ecfc50d2ab1349e27b53c4bc36df54;p=thirdparty%2Fqemu.git flatload: fix non-GOT relocations Use target address rather than host address when performing non-GOT relocations Signed-off-by: Corey J. Boyle Signed-off-by: Riku Voipio --- diff --git a/linux-user/flatload.c b/linux-user/flatload.c index 58f679e0728..ceb89bb6eaa 100644 --- a/linux-user/flatload.c +++ b/linux-user/flatload.c @@ -633,7 +633,7 @@ static int load_flat_file(struct linux_binprm * bprm, /* Get the pointer's value. */ if (get_user_ual(addr, rp)) return -EFAULT; - addr = flat_get_addr_from_rp(rp, relval, flags, &persistent); + addr = flat_get_addr_from_rp(addr, relval, flags, &persistent); if (addr != 0) { /* * Do the relocation. PIC relocs in the data section are