This may be a stupid question, but I am compiling for Arm9 with g++ and have a program crash with a backtrace listing. How do I get g++ to generate an object/function relative address listing?
Thanks in advance.
This may be a stupid question, but I am compiling for Arm9 with g++ and have a program crash with a backtrace listing. How do I get g++ to generate an object/function relative address listing?
Thanks in advance.
You don't: g++ produces *relocatable* objects, which linker then links into a final executable. Only at link stage are function addresses assigned.
You can use 'nm a.out' to find out what these assignments are, or use '-Wl,--print-map' (or '-Wl,-Map,foo.map') at link time to get a link map.
Cheers,
Thanks. Exactly what I needed.
Have something to add? Share your thoughts — no account required.
Ask the community — no account required