summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go/go-1.4/016-armhf-elf-header.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/go/go-1.4/016-armhf-elf-header.patch')
-rw-r--r--meta/recipes-devtools/go/go-1.4/016-armhf-elf-header.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/meta/recipes-devtools/go/go-1.4/016-armhf-elf-header.patch b/meta/recipes-devtools/go/go-1.4/016-armhf-elf-header.patch
new file mode 100644
index 0000000000..e6e414e52f
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.4/016-armhf-elf-header.patch
@@ -0,0 +1,24 @@
1Description: Use correct ELF header for armhf binaries.
2Author: Adam Conrad <adconrad@ubuntu.com>
3Last-Update: 2013-07-08
4
5Upstream-Status: Pending
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7
8Index: go/src/cmd/ld/elf.c
9===================================================================
10--- go.orig/src/cmd/ld/elf.c 2015-02-20 10:49:58.763451586 -0800
11+++ go/src/cmd/ld/elf.c 2015-02-20 10:49:27.895478521 -0800
12@@ -57,7 +57,11 @@
13 case '5':
14 // we use EABI on both linux/arm and freebsd/arm.
15 if(HEADTYPE == Hlinux || HEADTYPE == Hfreebsd)
16- hdr.flags = 0x5000002; // has entry point, Version5 EABI
17+#ifdef __ARM_PCS_VFP
18+ hdr.flags = 0x5000402; // has entry point, Version5 EABI, hard-float ABI
19+#else
20+ hdr.flags = 0x5000202; // has entry point, Version5 EABI, soft-float ABI
21+#endif
22 // fallthrough
23 default:
24 hdr.phoff = ELF32HDRSIZE; /* Must be be ELF32HDRSIZE: first PHdr must follow ELF header */