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

This is a discussion on How do I get a relative function/object address listing from g++... - Embedded ; 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 Thread
Results 1 to 3 of 3

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

  1. 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.

  2. Re: How do I get a relative function/object address listing fromg++...

    twgray writes:

    > How do I get g++
    > to generate an object/function relative address listing?


    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.

  3. Re: How do I get a relative function/object address listing fromg++...

    On Feb 16, 9:59*pm, Paul Pluzhnikov wrote:
    > twgray writes:
    > > How do I get g++
    > > to generate an object/function relative address listing?

    >
    > 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.

+ Reply to Thread