1 of 1 people found this helpful
Compiler optimizations might result in variables being moved to a resistor and so they do not have any address associated with them.
You can use objdump tool to check all the symbols in your program using the elf file of program:
objdump.exe --dwarf=info elf_file_name >text_file_name.txt
Besides you may have a look at this article: https://www.embeddedrelated.com/showarticle/900.php I found this interesting and relevant to your question.