diff --git a/librw_arm64/rw.py b/librw_arm64/rw.py index 600914ae..a0d99093 100644 --- a/librw_arm64/rw.py +++ b/librw_arm64/rw.py @@ -319,6 +319,9 @@ def dump(self): # we need one fake section just to represent the copy of the base address of the binary fd.write(f".section .fake.elf_header, \"a\", @progbits" + "\n") + # this makes sure the stack is not executable in kernels older than v5.8-rc1 + fd.write(f".section .note.GNU-stack, \"\", @progbits" + "\n") + # add weak symbols for symbol in self.container.symbols: if "@@" in symbol.name: continue