Yes. ASLR (
https://en.wikipedia.org/wiki/Address_space_layout_randomiza...) is a form of that.
Even if you don't want to give up the ability to compile new software, you could go much further, for example by permuting the system call table, enum values used in API's, field order, or argument order, or by changing the ABI. That would stop binary payloads in their tracks.
Disadvantage is that lots of code may make assumptions about either of these. So, each of such changes has a small risk that it exposes bugs in the code you intend to compile.
Changing the API also is an option, as it would truly require an attacker to tailor their malware for your particular OS. Problem is that it would require you to port all the software you intend to run to it. Net effect likely is that it is way more work for you to do than for a would-be attacker to break.
You could go even further by permuting or completely changing your CPU's instruction set, but that would kill any programs that generate code (native code compilers, many interpreters)
It still wouldn't guarantee you complete protection, though. If breaking your system is enticing enough, people may figure out its instruction set and ABI through trial and error and lots and lots of perseverance.