PhDUCSB <eng.hmohsen@xxxxxxxxx> writes: > I want to know which files in the gcc compiler deals with static and global > variable allocations because I would like to change the place they are > allocated at in memory. Any help would be appreciated. Thanks, They are handled in gcc/varasm.c. However, if what you care about is where they wind up in memory, then you probably don't want to fiddle with gcc. It is the linker which lays variables out in memory. One approach is to group variables into sections using the section attribute. Then use a linker script to put the sections at the addresses you want. Ian