> On Aug 9, 2016, at 8:48 AM, Shubha Ramani <[email protected]> wrote:
> 
> The reason being, I'd like to see the actual compiled and linked addresses of 
> certain Boot Services functions (like Timer interrupt handling).

In general with the edk2 you can only get offsets from the linked addresses. 
Most drivers/applications are linked at zero (Some times there is a pad ~0x240 
to make space for the PE/COFF image, if the linker did not create a PE/COFF 
image). The EFI images are relocatable PE/COFF images so when they are loaded 
in memory all the addresses get relocated to load address. This relocation even 
happens for the eXecute In Place code as the PE/COFF relocation is part of the 
FV (FLASH layout) construction. 

Thus you generally need a debugger on a live system to figure out what an 
address means. The caveat is there are some features to force loads at fixed 
addressees, and I must admit I've never debugged in this environment. 

The debugger can generally figure out the load address of the PE/COFF modules 
via this table: 
https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Guid/DebugImageInfoTable.h

I'd also point out if you know the offset into the start of the PE/COFF image 
of an address you can debug the system offline via gdb. My gdb is rusty (I use 
lldb), but you can just list the code add the offset as a gdb command `l 
*0x1234', assuming 0x1234 is the offset from the start of the PE/COFF image. 

Thanks,

Andrew Fish

> Thanks,
> Shubha Shubha D. [email protected]
> [email protected]
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.01.org/mailman/listinfo/edk2-devel

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to