title: Reference a variable by name in C++ by using Symbol Table
body: <p>Basically what the title asks.</p>
  
  <p>Being a bit unfamiliar with <code>C++</code>, and the more advanced concepts such as symbol tables, I've looked into it online but am struggling to find any direction towards what my end goal is. Most of the tutorials I've seen cater to C, and the closest question I've found (<a href="https://stackoverflow.com/questions/11254891/can-a-running-c-program-access-its-own-symbol-table">here</a>) puts me at a brick wall, as I've tried compiling it but I'm not getting the desired results, and I'm not too solid on how <code>extern "C"</code> works yet.</p>
  
  <p>By the end of this, I want to be able to access a variable from the symbol table, and change the variable. I have played around with <code>nm</code> and <code>objdump</code> (and coming from a hardware background, it's definitely cool to look at), and I looked into <code>dlsym</code>, <code>dlopen</code>, etc. but I'm not sure how that could help me (especially since I've seen it used in C more than anything else).</p>
  
  <p>Any advice or small snippets of code (so I can write my own sample program) would be great. Just to add, this is on a Linux system with a sort of outdated version of G++ (I'm not on the machine right now so I don't have that information) and I don't have access to upgrade it right now.</p>