This tutorial should be read alongside his Address Relocation answer from Stack Overflow: http://stackoverflow.com/questions/12122446/how-does-c-linki... And then you might want to skim through An Evil Copy: How the Loader Betrays You : https://www.microsoft.com/en-us/research/publication/evil-co...
Slightly OT, there was a very fun ActionScript exploit published by Mark Dowd of IBM in 2008. I'm reminded of it because it's about memory protection vulnerabilities.
"Application-Specific Attacks: Leveraging the ActionScript Virtual Machine"