Is it possible to force the compiler (with a directive or something) to store a specific part of the code in a predefined area in the memory? What I want to do is to be able to calculate a checksum of some specific functions in my code, so I later can prove that they are unchanged since the last build. My thought is that if I know in which memory area these functions are located then I can simply calculate a checksum of this area. Any ideas, someone?
The linker has a number of directives for locating code in specific places. You could probably perform your test earlier, say on the object files, rather than wait until the code is located and loaded -- unless you're trying to do this test at runtime.