1
0
mirror of https://github.com/golang/go synced 2024-11-11 22:50:22 -07:00

cmd/5l: add PT_PAX_FLAGS ELF header

Although I don't use PAX enabled ARM kernels, PAX
does have support for ARM, so we're better off add
PT_PAX_FLAGS now in case people use PAX kernels.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6453092
This commit is contained in:
Shenghou Ma 2012-08-09 08:47:43 +08:00
parent 22e918f5d6
commit af92b29fe6

View File

@ -963,6 +963,11 @@ asmb(void)
ph->flags = PF_W+PF_R;
ph->align = 4;
ph = newElfPhdr();
ph->type = PT_PAX_FLAGS;
ph->flags = 0x2a00; // mprotect, randexec, emutramp disabled
ph->align = 4;
sh = newElfShstrtab(elfstr[ElfStrShstrtab]);
sh->type = SHT_STRTAB;
sh->addralign = 1;