Local variable address in memory
For a homework assignment I have been given some c files, and compiled them using arm-linux-gcc (we will eventually be targeting gumstix boards, but for these exercises we have been working with qemu and ema). One of the questions confuses me a bit-- we are told to "..use arm-linux-objdump to find the location of variables declared in main() in the executable binary." However, these variables are local and thus shouldn't have addresses until runtime, correct? I'm thinking that maybe what I need to find is the offset in the stack frame, which can in fact be found using objdump (not that I know how). Anyways, any insight into the matter would be greatly appreciated, and I would be happy to post the source code if necessary.