Patchwork [v2] flatload: fix non-GOT relocations

login
register
mail settings
Submitter Corey J. Boyle
Date Oct. 5, 2013, 11:46 a.m.
Message ID <1380973591-24956-1-git-send-email-corey@kansanian.com>
Download mbox | patch
Permalink /patch/280764/
State New
Headers show

Comments

Corey J. Boyle - Oct. 5, 2013, 11:46 a.m.
From: "Corey J. Boyle" <corey@kansanian.com>

Use target address rather than host address when performing
non-GOT relocations

Signed-off-by: Corey J. Boyle <corey@kansanian.com>
---
 linux-user/flatload.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Corey J. Boyle - Nov. 11, 2013, 2:35 p.m.
Ping

http://patchwork.ozlabs.org/patch/280764/


On Sat, Oct 5, 2013 at 7:46 AM, Corey J. Boyle <corey@kansanian.com> wrote:

> From: "Corey J. Boyle" <corey@kansanian.com>
>
> Use target address rather than host address when performing
> non-GOT relocations
>
> Signed-off-by: Corey J. Boyle <corey@kansanian.com>
> ---
>  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
> --
> 1.7.9.5
>
>

Patch

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