How to disable address space randomization for a binary on Linux?

前端 未结 3 1969
攒了一身酷
攒了一身酷 2020-12-14 18:56

I\'m working on a runtime system for parallel programs that can take advantage of a common address space layout across multiple processes, potentially spread over several (t

3条回答
  •  [愿得一人]
    2020-12-14 19:45

    Presumably you have some kind of daemon which invokes your parallel programs on the nodes. If so, you can make this common parent disable ASLR for any child processes it creates.

    Look in GDB sources (7.0 or CVS Head) for how to do that. The gist of it is to call personality(orig_personality|ADDR_NO_RANDOMIZE) after fork and before exec.

提交回复
热议问题