I ran into this requirement on a project before using QNX 4. It was part of a gambling machine. I haven’t tried this with QNX 6 but I think it should be straight forward. You need to find the address and size of the executable. I’m pretty sure that pidin does something like this so there should be a way. It might require something extreme in the security area, like RING 0 access.
I’ve seen this type of requirement in two circumstances, the gaming board in Nevada required it for a computer run gambling game, and an FDA requirement in a medical instrument.
That said, I consider this type of programming a little ill conceived. To begin with, a bit changing in the code when your hardware isn’t hosed is extremely unlikely. If that is a concern, then consider that this is just as likely and probably more dangerous if the bit changes in data. In code there is a good chance you will get a SIGSEGV. In data it is unlikely unless the data is a pointer.
If the system protects life in a way that this possibility is unacceptable, you need a different strategy, something like triple redundancy with voting.