From patchwork Fri Nov 29 13:43:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 295328 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8159E2C00EF for ; Sat, 30 Nov 2013 00:45:14 +1100 (EST) Received: from localhost ([::1]:47405 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmONa-0002J5-0X for incoming@patchwork.ozlabs.org; Fri, 29 Nov 2013 08:45:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmOLj-00080O-MB for qemu-devel@nongnu.org; Fri, 29 Nov 2013 08:43:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VmOLd-00064z-TJ for qemu-devel@nongnu.org; Fri, 29 Nov 2013 08:43:15 -0500 Received: from afflict.kos.to ([92.243.29.197]:52896) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmOLd-00064P-Mw for qemu-devel@nongnu.org; Fri, 29 Nov 2013 08:43:09 -0500 Received: from kos.to (91-157-196-38.elisa-laajakaista.fi [91.157.196.38]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id EAE5526556 for ; Fri, 29 Nov 2013 14:43:07 +0100 (CET) Received: from voipio (uid 1000) (envelope-from voipio@kos.to) id 5e0246 by kos.to (DragonFly Mail Agent); Fri, 29 Nov 2013 15:43:07 +0200 From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Fri, 29 Nov 2013 15:43:04 +0200 Message-Id: <9721cf2cd6ecfc50d2ab1349e27b53c4bc36df54.1385732338.git.riku.voipio@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 92.243.29.197 Cc: "Corey J. Boyle" Subject: [Qemu-devel] [PATCH 3/5] flatload: fix non-GOT relocations X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: "Corey J. Boyle" Use target address rather than host address when performing non-GOT relocations Signed-off-by: Corey J. Boyle Signed-off-by: Riku Voipio --- linux-user/flatload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/flatload.c b/linux-user/flatload.c index 58f679e..ceb89bb 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