diff options
Diffstat (limited to 'meta/recipes-devtools/go/go-1.8/armhf-elf-header.patch')
-rw-r--r-- | meta/recipes-devtools/go/go-1.8/armhf-elf-header.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/meta/recipes-devtools/go/go-1.8/armhf-elf-header.patch b/meta/recipes-devtools/go/go-1.8/armhf-elf-header.patch new file mode 100644 index 0000000000..3508838e8b --- /dev/null +++ b/meta/recipes-devtools/go/go-1.8/armhf-elf-header.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | Encode arm EABI ( hard/soft ) calling convention in ELF header | ||
2 | |||
3 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
4 | Upstream-Status: Pending | ||
5 | Index: go/src/cmd/link/internal/ld/elf.go | ||
6 | =================================================================== | ||
7 | --- go.orig/src/cmd/link/internal/ld/elf.go | ||
8 | +++ go/src/cmd/link/internal/ld/elf.go | ||
9 | @@ -950,7 +950,13 @@ func Elfinit(ctxt *Link) { | ||
10 | case sys.ARM, sys.MIPS: | ||
11 | if SysArch.Family == sys.ARM { | ||
12 | // we use EABI on linux/arm, freebsd/arm, netbsd/arm. | ||
13 | - if Headtype == obj.Hlinux || Headtype == obj.Hfreebsd || Headtype == obj.Hnetbsd { | ||
14 | + if Headtype == obj.Hlinux { | ||
15 | + if obj.GOARM == 7 { | ||
16 | + ehdr.flags = 0x5000402 // has entry point, Version5 EABI, hard float | ||
17 | + } else { | ||
18 | + ehdr.flags = 0x5000202 // has entry point, Version5 EABI, soft float | ||
19 | + } | ||
20 | + } else if Headtype == obj.Hfreebsd || Headtype == obj.Hnetbsd { | ||
21 | // We set a value here that makes no indication of which | ||
22 | // float ABI the object uses, because this is information | ||
23 | // used by the dynamic linker to compare executables and | ||