summaryrefslogtreecommitdiff
path: root/include/peimage.h
AgeCommit message (Collapse)Author
2025-02-25peimage.h: minor whitespace fixesPeter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2025-02-18post-process-pe: add tests to validate NX complianceDennis Tseng
This changes post-process-pe to give warnings, and optionally errors, if a shim binary is built with Section Alignment or characteristics are not compatible with NX, or if the EFI_IMAGE_DLLCHARACTERISTICS_NX_COMPAT flag is not set and require_nx_compat is true. Co-authored-by: Peter Jones <pjones@redhat.com> Co-authored-by: Kamil Aronowski <kamil.aronowski@yahoo.com> Signed-off-by: Dennis Tseng <dennis.tseng@suse.com>
2023-01-27pe: Add IS_PAGE_ALIGNED macroNicholas Bishop
This makes some checks in `get_mem_attrs` and `update_mem_attrs` clearer. Also add `test-pe-util.c` with a test for the new macro. The file is named that way instead of `test-pe.c` to avoid having to get `pe.c` building in the unit test environment. Signed-off-by: Nicholas Bishop <nicholasbishop@google.com>
2022-05-18peimage.h: make our signature macros force the typePeter Jones
scan-build invoked clang in a way that complains about our SIGNATURE_XX() macro's sizes being used to assign to things that are that size in post-process-pe.c. This patch makes them cast the results to the appropriately sized type. Signed-off-by: Peter Jones <pjones@redhat.com>
2022-05-17Add some missing PE image flag definitionsPeter Jones
This patch adds some missing definitions for PE header flags. We don't use all of them, but it's less confusing with the list matching the spec, except where the spec is obviously wrong. Signed-off-by: Peter Jones <pjones@redhat.com>
2021-02-16Fix up a bunch of our license statements and add SPDX most placesPeter Jones
The license statements in our source files were getting to be a giant mess, and mostly they all just say the same thing. I've switched most of it to SPDX labels, but left copyright statements in place (where they were not obviously incorrect copy-paste jobs that I did...). If there's some change here you don't think is valid, let me know and we can fix it up together. Signed-off-by: Peter Jones <pjones@redhat.com>
2021-01-29Renaming PeImage.h to pe.h wasn't actually a good idea.Peter Jones
I renamed PeImage.h to pe.h when I de-capitalized them, but this turns out to be a bad idea because we already have a pe.h on the SBAT branch. Woops. This moves it to peimage.h Signed-off-by: Peter Jones <pjones@redhat.com>