Self modifying code always segmentation faults on Linux

前端 未结 3 921
忘了有多久
忘了有多久 2020-12-01 10:17

i found an article about self modifying code and tried to do some examples, but i get always segmentation faults. As fas as i can understand, there is a violation in memory

3条回答
  •  春和景丽
    2020-12-01 10:20

    You can also disable write-protection for the entire program by passing the switch -N to the linker. If you are invoking the linker from gcc, pass Wl,-N. If you invoke ld directly, pass -N.

提交回复
热议问题