Is possible to obtain assembly output from modules?


alejandro.estay@...
 

Hi
I want to check some .efi and call format stuff. However I don't know exactly how to produce assembly output from edk2 gcc. I was trying to tweak .dsc. The problem is that the last file is compile overwrites the rrest for every module.
I pasted this at the end of MdeModulePkg last line
-Wa,-adhln=asmdump.asm

However asmdump.asm only contains listing for the last file compiled in the module Is there a better way to do this?


Laszlo Ersek
 

On 01/14/20 04:41, alejandro.estay@... wrote:
Hi
I want to check some .efi and call format stuff. However I don't know exactly how to produce assembly output from edk2 gcc. I was trying to tweak .dsc. The problem is that the last file is compile overwrites the rrest for every module.
I pasted this at the end of MdeModulePkg last line
-Wa,-adhln=asmdump.asm

However asmdump.asm only contains listing for the last file compiled in the module Is there a better way to do this?
The way I generally do this (for OVMF) is as follows:

- run a complete NOOPT build

- run a command like:

objdump -S Build/Ovmf3264/NOOPT_GCC48/X64/MdeModulePkg/Core/PiSmmCore/PiSmmCore/DEBUG/PiSmmCore.debug \
| less

This is going to give you a disassembly intermixed with C source code, for the "MdeModulePkg/Core/PiSmmCore/PiSmmCore.c" file.

Update the pathname as necessary.

Thanks
Laszlo


alejandro.estay@...
 

That did exactly I wanted. Thanks Laszlo.