mirror of
https://github.com/golang/go
synced 2024-11-25 04:47:57 -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:
parent
22e918f5d6
commit
af92b29fe6
@ -963,6 +963,11 @@ asmb(void)
|
|||||||
ph->flags = PF_W+PF_R;
|
ph->flags = PF_W+PF_R;
|
||||||
ph->align = 4;
|
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 = newElfShstrtab(elfstr[ElfStrShstrtab]);
|
||||||
sh->type = SHT_STRTAB;
|
sh->type = SHT_STRTAB;
|
||||||
sh->addralign = 1;
|
sh->addralign = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user