Skip to contentSkip to conversation

flatload: fix non-GOT relocations

PATCH In review Corey J. Boyle 1 participant 2 messages Oct 5, 2013 – Nov 11, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 flatload: fix non-GOT relocations

From: "Corey J. Boyle" <[email protected]>

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

---
 linux-user/flatload.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/flatload.c +1 -1
index 58f679e..ceb89bb 100644
@@ -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
Signature · 1 line
1.7.9.5
#1 lore raw

Ping

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

Quoted 28 lines · Corey J. Boyle

From: "Corey J. Boyle" <[email protected]>

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

---
 linux-user/flatload.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/flatload.c +1 -1
index 58f679e..ceb89bb 100644
@@ -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