Commit 1cf27acf authored by Shenghou Ma's avatar Shenghou Ma

cmd/ld: set ELF header flags for our Linux/ARM binary

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
parent 251199c4
...@@ -52,6 +52,9 @@ elfinit(void) ...@@ -52,6 +52,9 @@ elfinit(void)
break; break;
// 32-bit architectures // 32-bit architectures
case '5':
hdr.flags = 0x5000002; // has entry point, Version5 EABI
// fallthrough
default: default:
hdr.phoff = ELF32HDRSIZE; /* Must be be ELF32HDRSIZE: first PHdr must follow ELF header */ hdr.phoff = ELF32HDRSIZE; /* Must be be ELF32HDRSIZE: first PHdr must follow ELF header */
hdr.shoff = ELF32HDRSIZE; /* Will move as we add PHeaders */ hdr.shoff = ELF32HDRSIZE; /* Will move as we add PHeaders */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment