NEnewman314·Nov 11, 2021
Also, one can use checksec to confirm that the protections are actually in place. https://github.com/slimm609/checksec.sh
I happened to be looking at this for Go binaries last night and it seems that -buildmode=pie gets you part of the way there. Was trying to see if full relro was possible with CGO_ENABLED=0 but it seems only partial was achievable in the few hours I spent.
In Hardening ELF binaries using Relocation Read-Only (2019)