]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/ld: set ELF header flags for our Linux/ARM binary
authorShenghou Ma <minux.ma@gmail.com>
Thu, 23 Aug 2012 06:33:41 +0000 (14:33 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Thu, 23 Aug 2012 06:33:41 +0000 (14:33 +0800)
To make it more compliant.
This won't affect the behavior of running on OABI-only kernels.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/6475044

src/cmd/ld/elf.c

index a3359cdd726087d9355da4c7aed95128d9dff3a1..a4829da4e885c4d300ab9970fcbb6f2401a78682 100644 (file)
@@ -52,6 +52,9 @@ elfinit(void)
                break;
 
        // 32-bit architectures
+       case '5':
+               hdr.flags = 0x5000002; // has entry point, Version5 EABI
+               // fallthrough
        default:
                hdr.phoff = ELF32HDRSIZE;       /* Must be be ELF32HDRSIZE: first PHdr must follow ELF header */
                hdr.shoff = ELF32HDRSIZE;       /* Will move as we add PHeaders */