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

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.

Reply to
twgray
Loading thread data ...

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.
Reply to
Paul Pluzhnikov

Thanks. Exactly what I needed.

Reply to
twgray

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.