How do I get a relative function/object address listing from g++...

Feb 16, 2008 2 Replies

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,

In order to understand recursion you must first understand recursion. Remove /-nsp/ for email.

Thanks. Exactly what I needed.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required