21 Commits

Author SHA1 Message Date
Marvin Häuser
38cbc7de6b MdePkg/BasePeCoffLib2: Fix invalid ASSERT for when RelocDirSize == 0 2023-05-10 10:22:23 +03:00
Marvin Häuser
2304aa1fd3 MdePkg/BasePeCoffLib2: Fix uninitialized RtContext for RelocateImage() 2023-05-10 10:22:22 +03:00
Marvin Häuser
d6657d8dd7 MdePkg/BasePeCoffLib2: Fix RuntimeRelocate sanity-check 2023-05-10 10:22:22 +03:00
Marvin Häuser
a8f69bde96 MdePkg/PeCoffLib2: Expose ARM Thumb MOVW/MOVT relocation helpers 2023-05-10 10:22:22 +03:00
Marvin Häuser
1c6925aaa2 Drop support for the TE format 2023-04-12 19:56:18 +03:00
Marvin Häuser
7b022c46d0 MdePkg/BasePeCoffLib2: Only validate ExeHdrOffset when non-zero 2023-04-10 10:57:28 +02:00
Mikhail Krichanov
60e0471175 MdePkg/BasePeCoffLib2: Fix ARM Thumb apply relocation routine
Thumb instructions are either 16-bit or 32-bit, and are aligned on
a two-byte boundary

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-04-10 10:31:53 +02:00
Marvin Häuser
b137c5414d MdePkg/BasePeCoffLib2: Read debug directory from the image memory 2023-04-02 00:04:47 +02:00
Marvin Häuser
94af9da84b MdePkg/BasePeCoffLib2: Distinguish between unsupported and corrupted 2023-04-02 00:04:47 +02:00
Marvin Häuser
eea8ba4030 MdePkg/UefiImageLib: Require callers to allocate aligned memory 2023-03-30 17:15:14 +02:00
Marvin Häuser
b74a1336a5 MdePkg/BasePeCoffLib2: Move ExtraAction to UefiImageLib 2023-03-30 00:18:28 +02:00
Marvin Häuser
46a55a1dc4 MdePkg/BasePeCoffLib2: Fix call to RelocateExtraAction 2023-03-29 19:57:39 +02:00
Mikhail Krichanov
730a27d321 MdePkg: Added CONST to fix ArmVirtPkg compilation. 2023-03-16 15:33:03 +03:00
Mikhail Krichanov
860dcd18cd MdePkg: Returned some #includes. 2023-03-16 12:20:13 +03:00
Mikhail Krichanov
30d425b06f MdePkg: Included BaseLib.h in DebugLib.h as it's needed for CpuBreakpoint(). Reverted minor changes. 2023-03-16 12:20:13 +03:00
Mikhail Krichanov
8eaa875cc4 MdePkg: Placed import of PcdLib.h into DebugLib.h. 2023-03-16 12:20:13 +03:00
Mikhail Krichanov
c9b10ce0c1 MdePkg: Redefined DEBUG_RAISE() to facilitate fuzzing. 2023-03-16 12:20:13 +03:00
Vitaly Cheptsov
d230c91de9 MdePkg/BasePeCoffLib2: Remove DEBUG_RAISE on invalid DebugDir size
EfiBoot images contain a sum of EFI_IMAGE_DEBUG_DIRECTORY_ENTRY and
EFI_IMAGE_DEBUG_CODEVIEW_MTOC_ENTRY sizes in DebugDir size.
Since our XCODE5 toolchain generates NB10 debug entries and we do not
have access to Apple DEBUG symbols, just ignore this debug information.

Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
2023-02-12 09:57:12 +03:00
Vitaly Cheptsov
39d0ce7013 MdePkg: Add PCD to remove X perm from image sections with WX perms
This feature is useful for images created by old Apple mtoc utility.

Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
2023-01-04 20:03:26 +03:00
Mikhail Krichanov
cf92e9f7d7 BaseTools: Replaced GenFw with ImageTool and MicroTool. 2022-12-28 17:21:20 +03:00
Mikhail Krichanov
ef68b89fbc SecurePE: Replaced old PE loader with Secure one. 2022-12-28 17:08:53 +03:00