[U-Boot] QUESTION: How do I generate an assembly listing?

I need to generate an assembly listing that contains all the assembly code generated by the compiler. I have tried putting the standard GCC options in ppc_config.mk, but cannot get the results I am looking for.
What I need is a listing file that contains the address (preferably with _start at 0x00000000) and the function name and any assembly code with their respective addresses.
Can this easily be done?
-- Jonathan R. Haws Electrical Engineering Space Dynamics Laboratory
Jonathan.Haws@sdl.usu.edu (435)797-4629

Dear Jonathan Haws,
In message BB99A6BA28709744BF22A68E6D7EB51F01CB587366@midas.usurf.usu.edu you wrote:
I need to generate an assembly listing that contains all the assembly code generated by the compiler. I have tried putting the standard GCC options in ppc_config.mk, but cannot get the results I am looking for.
What I need is a listing file that contains the address (preferably with _start at 0x00000000) and the function name and any assembly code with their respective addresses.
Can this easily be done?
Use objdump -SD u-boot ? on the other hand - why would anybody need that? Don't you know how to use gdb?
Best regards,
Wolfgang Denk

Jonathan Haws wrote:
I need to generate an assembly listing that contains all the assembly code generated by the compiler. I have tried putting the standard GCC options in ppc_config.mk, but cannot get the results I am looking for.
What I need is a listing file that contains the address (preferably with _start at 0x00000000) and the function name and any assembly code with their respective addresses.
${CROSS_COMPILE}objdump -d <elffile>
The elf file can be unlinked or linked.
You can also use the -S switch to stop gcc at the assembly language output level.
Can this easily be done?
Yes. There are other switches available with gcc and objdump to do various things like interspersing the C source in with the (dis)assembly.
-- Jonathan R. Haws
Best regards, gvb
participants (3)
-
Jerry Van Baren
-
Jonathan Haws
-
Wolfgang Denk