jeudi 5 mars 2015

What is the proper way to access a variable contained within a namespace from ARM assembly


Normally, I can access a c variable form a S file with the following (shortened for brevity):



// file.c
int _tester;

// file.S
.extern _tester;

ldr r0, = _tester // load c variable _tester in to register0


However, I am unable to access this variable the same way:



// file.cpp
namespace earth
{
int _tester;
}


I realize the name is getting mangled. The question is, can I access that variable without looking up and hardcoding the mangled name in the assembly file?




Aucun commentaire:

Enregistrer un commentaire