riscv: add STRICT_KERNEL_RWX support

The commit contains that make text section as non-writable, rodata
section as read-only, and data section as non-executable.

The init section should be changed to non-executable.

Signed-off-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
This commit is contained in:
Zong Li 2020-03-10 00:55:41 +08:00 • committed by Palmer Dabbelt
commit d27c3c9081
No known key found for this signature in database
GPG key ID: 2E1319F35FBB1889
3 changed files with 53 additions and 0 deletions