blob: 1ae53a38cd940a299bea429017d932a92d772dc1 [file] [log] [blame]
Patrick Williamsd849ec72016-08-17 14:59:38 -05001Description: Use correct ELF header for armhf binaries.
2Author: Adam Conrad <adconrad@ubuntu.com>
3Last-Update: 2013-07-08
4
5Index: go/src/cmd/ld/elf.c
6===================================================================
7--- go.orig/src/cmd/ld/elf.c 2015-02-20 10:49:58.763451586 -0800
8+++ go/src/cmd/ld/elf.c 2015-02-20 10:49:27.895478521 -0800
9@@ -57,7 +57,11 @@
10 case '5':
11 // we use EABI on both linux/arm and freebsd/arm.
12 if(HEADTYPE == Hlinux || HEADTYPE == Hfreebsd)
13- hdr.flags = 0x5000002; // has entry point, Version5 EABI
14+#ifdef __ARM_PCS_VFP
15+ hdr.flags = 0x5000402; // has entry point, Version5 EABI, hard-float ABI
16+#else
17+ hdr.flags = 0x5000202; // has entry point, Version5 EABI, soft-float ABI
18+#endif
19 // fallthrough
20 default:
21 hdr.phoff = ELF32HDRSIZE; /* Must be be ELF32HDRSIZE: first PHdr must follow ELF header */