How to place a variable at a given absolute address in memory (with GCC)
I don’t know, but you can easily create a workaround like this: int *var = (int*)0x40001000; *var = 4; It’s not exactly the same thing, but in most situations a perfect substitute. It will work with any compiler, not just GCC. If you use GCC, I assume you also use GNU ld (although it is … Read more