summaryrefslogtreecommitdiffstats
path: root/ShellPkg
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-03-31 09:27:38 +0200
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-04-18 10:18:14 +0200
commita8c39ba2986c1ffb1dab864cefedc86402a9695c (patch)
tree9b2ed9de7f5c5105481601b02eb4e992693a474b /ShellPkg
parent60cfeeb3b656e746f98620cb99a971ee6310b028 (diff)
downloadedk2-a8c39ba2986c1ffb1dab864cefedc86402a9695c.tar.gz
edk2-a8c39ba2986c1ffb1dab864cefedc86402a9695c.tar.bz2
edk2-a8c39ba2986c1ffb1dab864cefedc86402a9695c.zip
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>
Diffstat (limited to 'ShellPkg')
0 files changed, 0 insertions, 0 deletions