audk/ArmPlatformPkg
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
..
ArmJunoPkg ArmPlatformPkg: Remove orphaned Juno Makefile 2016-02-18 11:21:37 +00:00
ArmVExpressPkg ArmPlatformPkg: delete orphaned ArmVExpress.dsc.inc 2016-03-01 10:25:30 +00:00
Bds ArmPlatformPkg/Bds: Early Console Initialization 2016-02-09 18:23:57 +00:00
Documentation ArmPlatformPkg: Rectify file modes 2016-02-02 11:42:31 +00:00
Drivers ArmPlatformPkg: PL061: support multiple controller 2016-03-14 13:17:34 +00:00
FileSystem/BootMonFs ArmPlatformPkg: Fixed builds after some ShellPkg libraries have moved 2015-01-13 18:58:00 +00:00
Include ArmPlatformPkg: PL061: support multiple controller 2016-03-14 13:17:34 +00:00
Library ArmPlatformPkg/IntelBds: call BdsLibConnectAll() 2016-02-24 10:35:51 +00:00
MemoryInitPei ArmPlatformPkg: Rectify file modes 2016-02-02 11:42:31 +00:00
PlatformPei ArmPlatformPkg: Rectify file modes 2016-02-02 11:42:31 +00:00
PrePeiCore ArmPlatformPkg: fixups for 64-bit pointers 2016-03-25 07:17:28 +01:00
PrePi ArmPlatformPkg: fixups for 64-bit pointers 2016-03-25 07:17:28 +01:00
Scripts ArmPlatformPkg/DS-5: fix 64-bit PE/COFF header parsing bug 2016-04-18 10:18:14 +02:00
ArmPlatformPkg.dec ArmPlatformPkg: Add PCD for Pl011 UART Interrupt 2016-04-01 16:45:54 +02:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
License.txt ArmPlatformPkg: Rectify file modes 2016-02-02 11:42:31 +00:00