Open thomasnyman opened 3 weeks ago
Some notes:
--disable-separate-code
when building Binutils which will change that behaviour--rosegment
which is in binutils-2.43. See https://sourceware.org/PR30907 too.-Wl,-z,separate-code
. I haven't read enough about rosegment
yet.
Splitting this off from Dominik Czarnota's extensive feedback in #330.
The
-Wl,-z,separate-code
option ensures that the ELF header is not mapped with executable rights. This is effectively a complement to RELRO but instead of applying read-only permissions to sensitive parts of the data segment, it applies read-only permissions to potentially dangerous areas of the code segment.Resources: