Commit Graph

1 Commits

Author SHA1 Message Date
Chris Coulson
cfd1f2f42a uefi-capsule: Ensure SBAT metadata is added correctly
The current approach of adding SBAT metadata after linking is creating
an image that is badly formed in 2 ways:

 * The SBAT section's file offset and size are not a multiple of the
   file alignment.

 * The SBAT section has a virtual address of zero. EDK2 loads the header
   here, and so it gets rejected.

This changes the approach to match shim, where an object file is
created with a .sbat section and then the linker takes care of placing
the section at a more appropriate virtual address.

See https://github.com/vathpela/gnu-efi/pull/14 for the section addition.
2021-02-22 16:19:19 +00:00