From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSEDY-0001hn-GN for qemu-devel@nongnu.org; Fri, 04 Oct 2013 18:51:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VSEDS-0004Fq-Tf for qemu-devel@nongnu.org; Fri, 04 Oct 2013 18:51:28 -0400 Received: from mail-ie0-x229.google.com ([2607:f8b0:4001:c03::229]:35649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSEDS-0004DG-O4 for qemu-devel@nongnu.org; Fri, 04 Oct 2013 18:51:22 -0400 Received: by mail-ie0-f169.google.com with SMTP id tp5so11002698ieb.28 for ; Fri, 04 Oct 2013 15:51:21 -0700 (PDT) Sender: Corey Boyle From: "Corey J. Boyle" Date: Fri, 4 Oct 2013 18:50:30 -0400 Message-Id: <1380927030-28198-1-git-send-email-corey@kansanian.com> Subject: [Qemu-devel] [PATCH] flatload: fix non-GOT relocations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Riku Voipio , "Corey J. Boyle" From: "Corey J. Boyle" Use target address rather than host address when performing non-GOT relocations Signed-off-by: Corey J. Boyle --- linux-user/flatload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/flatload.c b/linux-user/flatload.c index 58f679e..c13a201 100644 --- a/linux-user/flatload.c +++ b/linux-user/flatload.c @@ -44,7 +44,7 @@ #define ntohl(x) be32_to_cpu(x) #include -//#define DEBUG +#define DEBUG #ifdef DEBUG #define DBG_FLT(...) printf(__VA_ARGS__) @@ -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 -- 1.7.9.5