summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2021-05-13 20:42:18 -0400
committerPeter Jones <pjones@redhat.com>2021-05-25 11:03:26 -0400
commit05875f3aed1c90fe071c66de05744ca2bcbc2b9e (patch)
treef5b63763e51d5332458a2aa43ec941df4a20f278 /lib
parent493bd940e5c6e28e673034687de7adef9529efff (diff)
downloadefi-boot-shim-05875f3aed1c90fe071c66de05744ca2bcbc2b9e.tar.gz
efi-boot-shim-05875f3aed1c90fe071c66de05744ca2bcbc2b9e.zip
Post-process our PE to be sure.
On some versions of binutils[0], including binutils-2.23.52.0.1-55.el7, do not correctly initialize the data when computing the PE optional header checksum. Unfortunately, this means that any time you get a build that reproduces correctly using the version of objcopy from those versions, it's just a matter of luck. This patch introduces a new utility program, post-process-pe, which does some basic validation of the resulting binaries, and if necessary, performs some minor repairs: - sets the timestamp to 0 - this was previously done with dd using constant offsets that aren't really safe. - re-computes the checksum. [0] I suspect, but have not yet fully verified, that this is accidentally fixed by the following upstream binutils commit: commit cf7a3c01d82abdf110ef85ab770e5997d8ac28ac Author: Alan Modra <amodra@gmail.com> Date: Tue Dec 15 22:09:30 2020 +1030 Lose some COFF/PE static vars, and peicode.h constify This patch tidies some COFF and PE code that unnecessarily used static variables to communicate between functions. v2 - MAP_PRIVATE was totally wrong... Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions