Is it possible to allocate same address to two different global variables in C in same build? I have tried several ways using linker but I was not successful. If it is not allowed, can someone please elaborate why? And if it is allowed, how to do it.
Edit 1
For example in {file1.c} I have a global variable {int a} and in {file2.c} I have a global variable {int b}. Is possible to link them to same address? I am not providing the detail here, because I have already analyzed other options of achieving this. The objective of this questions is know if same memory linking is possible.