audk/ArmPlatformPkg/Scripts/Ds5
Ard Biesheuvel a8c39ba298 ArmPlatformPkg/DS-5: fix 64-bit PE/COFF header parsing bug
The 64-bit version of the DS-5 debug script that retrieves the debug file
path from the PE/COFF image in memory assumes that the PE/COFF header is
packed, and that the debug directory entry in the optional header appears
at a fixed offset into the file. This is no longer true, now that we pad
between the file header and the PE header if the section alignment exceeds
the size of the header (which may be the case when the module contains a
vector table or small model code, which requires 2 KB or 4 KB section
alignment, respectively), to allow this padding to be emitted if the image
is subsequently converted to TE format.

So replace the fixed offset with a dereference of the appropriate header
field.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reported-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
2016-04-18 10:18:14 +02:00
..
build_report.py ARM Packages: Removed trailing spaces 2014-08-19 13:29:52 +00:00
cmd_load_symbols.py ARM Packages: Removed trailing spaces 2014-08-19 13:29:52 +00:00
edk2_debugger.py ARM Packages: Removed trailing spaces 2014-08-19 13:29:52 +00:00
firmware_volume.py ArmPlatformPkg/DS-5: fix 64-bit PE/COFF header parsing bug 2016-04-18 10:18:14 +02:00
profile.py ArmPlatformPkg/Scripts: Update the profiling script to work on AArch64 with the latest DS-5 2014-08-19 13:36:00 +00:00
system_table.py ARM Packages: Removed trailing spaces 2014-08-19 13:29:52 +00:00