* [Buildroot] [PATCH] elf2flt: fix threading apps on ARM noMMU systems
@ 2016-08-24 21:03 Waldemar Brodkorb
2016-08-25 13:57 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Waldemar Brodkorb @ 2016-08-24 21:03 UTC (permalink / raw)
To: buildroot
See this thread, which explains the problem in detail:
http://mailman.uclinux.org/pipermail/uclinux-dev//2016-April/052713.html
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
This should be applied to master.
---
...-relocation-support-for-R_ARM_TARGET-type.patch | 34 ++++++++++++++++++++++
1 file changed, 34 insertions(+)
create mode 100644 package/elf2flt/0001-elf2flt-fix-relocation-support-for-R_ARM_TARGET-type.patch
diff --git a/package/elf2flt/0001-elf2flt-fix-relocation-support-for-R_ARM_TARGET-type.patch b/package/elf2flt/0001-elf2flt-fix-relocation-support-for-R_ARM_TARGET-type.patch
new file mode 100644
index 0000000..b9615ab
--- /dev/null
+++ b/package/elf2flt/0001-elf2flt-fix-relocation-support-for-R_ARM_TARGET-type.patch
@@ -0,0 +1,34 @@
+From dedce8765d203c1c162a57e6259375e0b457173f Mon Sep 17 00:00:00 2001
+From: Greg Ungerer <gerg@linux-m68k.org>
+Date: Fri, 19 Aug 2016 23:49:51 +1000
+Subject: [PATCH] elf2flt: fix relocation support for R_ARM_TARGET types
+
+R_ARM_TARGET1 (and I think R_ARM_TARGET2) relocation types should be
+treated in the same way as R_ARM_ABS32. Fix them to write out the addend
+to the flat binary in network byte order.
+
+Signed-off-by: Greg Ungerer <gerg@uclinux.org>
+Tested-by: Waldemar Brodkorb <wbx@openadk.org>
+
+---
+ elf2flt.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/elf2flt.c b/elf2flt.c
+index 5ae7dd9..3f31569 100644
+--- a/elf2flt.c
++++ b/elf2flt.c
+@@ -1505,7 +1505,9 @@ DIS29_RELOCATION:
+ (((*p)->howto->type != R_ARM_PC24) &&
+ ((*p)->howto->type != R_ARM_PLT32)))
+ tmp.c[i3] = (hl >> 24) & 0xff;
+- if ((*p)->howto->type == R_ARM_ABS32)
++ if (((*p)->howto->type == R_ARM_ABS32) ||
++ ((*p)->howto->type == R_ARM_TARGET1) ||
++ ((*p)->howto->type == R_ARM_TARGET2))
+ *(uint32_t *)r_mem = htonl(hl);
+ else
+ *(uint32_t *)r_mem = tmp.l;
+--
+1.9.1
+
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] elf2flt: fix threading apps on ARM noMMU systems
2016-08-24 21:03 [Buildroot] [PATCH] elf2flt: fix threading apps on ARM noMMU systems Waldemar Brodkorb
@ 2016-08-25 13:57 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2016-08-25 13:57 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 24 Aug 2016 23:03:43 +0200, Waldemar Brodkorb wrote:
> See this thread, which explains the problem in detail:
> http://mailman.uclinux.org/pipermail/uclinux-dev//2016-April/052713.html
>
> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
> ---
> This should be applied to master.
> ---
> ...-relocation-support-for-R_ARM_TARGET-type.patch | 34 ++++++++++++++++++++++
> 1 file changed, 34 insertions(+)
> create mode 100644 package/elf2flt/0001-elf2flt-fix-relocation-support-for-R_ARM_TARGET-type.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-25 13:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-24 21:03 [Buildroot] [PATCH] elf2flt: fix threading apps on ARM noMMU systems Waldemar Brodkorb
2016-08-25 13:57 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox