flatload: fix non-GOT relocations
PATCH 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
Signed-off-by Corey J. Boyle <[email protected]>
--- linux-user/flatload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
linux-user/flatload.c +2 -2
@@ -44,7 +44,7 @@#define ntohl (x) be32_to_cpu(x)#include <target_flat.h> -//#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
Signature · 1 line
1.7.9.5
Quoted 15 lines · Corey J. Boyle
From: "Corey J. Boyle" <[email protected]>
Use target address rather than host address when performing non-GOT relocations
Signed-off-by Corey J. Boyle <[email protected]>--- linux-user/flatload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)linux-user/flatload.c +0
-0
linux-user/flatload.c line 47
Quoted 5 lines
linux-user/flatload.c +1
-1@@ -44,7 +44,7 @@#define ntohl (x) be32_to_cpu(x)#include <target_flat.h> -//#define DEBUG +#define DEBUG
I assume you didn't mean to leave debugging enabled...
thanks
-- PMM
Quoted 19 lines · Peter Maydell
Quoted 18 lines · Corey J. Boyle
From: "Corey J. Boyle" <[email protected]>
Use target address rather than host address when performing non-GOT relocations
Signed-off-by Corey J. Boyle <[email protected]>--- linux-user/flatload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)linux-user/flatload.c +0
-0@@ -44,7 +44,7 @@#define ntohl (x) be32_to_cpu(x)#include <target_flat.h>
Quoted 6 lines
linux-user/flatload.c line 47
Quoted 2 lines
linux-user/flatload.c +1
-1-//#define DEBUG +#define DEBUG I assume you didn't mean to leave debugging enabled...
No, I didn't mean for that to stick around. I'll upload a new patch.
Thanks
Corey