diff options
| author | Peter Jones <pjones@redhat.com> | 2022-12-05 17:57:36 -0500 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2022-12-07 10:45:23 -0500 |
| commit | 657b2483ca6e9fcf2ad8ac7ee577ff546d24c3aa (patch) | |
| tree | dcee3df773efd3e523e2188ad33ff4ffc1a40e63 /include | |
| parent | 11491619f4336fef41c3519877ba242161763580 (diff) | |
| download | efi-boot-shim-657b2483ca6e9fcf2ad8ac7ee577ff546d24c3aa.tar.gz efi-boot-shim-657b2483ca6e9fcf2ad8ac7ee577ff546d24c3aa.zip | |
Make sbat_var.S parse right with buggy gcc/binutils
In https://github.com/rhboot/shim/issues/533 , iokomin noticed that
gas in binutils before 2.36 appears to be incorrectly concatenating
string literals in '.asciz' directives, including an extra NUL character
in between the strings, and this will cause us to incorrectly parse the
.sbatlevel section in shim binaries.
This patch adds test cases that will cause the build to fail if this has
happened, as well as changing sbat_var.S to to use '.ascii' and '.byte'
to construct the data, rather than using '.asciz'.
Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/test.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/test.mk b/include/test.mk index c0e24095..c37b8446 100644 --- a/include/test.mk +++ b/include/test.mk @@ -92,7 +92,7 @@ test-mock-variables: CFLAGS+=-DHAVE_SHIM_LOCK_GUID test-mok-mirror_FILES = mok.c globals.c tpm.c lib/guid.c lib/variables.c mock-variables.c test-mok-mirror: CFLAGS+=-DHAVE_START_IMAGE -DHAVE_SHIM_LOCK_GUID -test-sbat_FILES = csv.c lib/variables.c lib/guid.c sbat_var.S +test-sbat_FILES = csv.c lib/variables.c lib/guid.c sbat_var.S mock-variables.c test-sbat :: CFLAGS+=-DHAVE_GET_VARIABLE -DHAVE_GET_VARIABLE_ATTR -DHAVE_SHIM_LOCK_GUID test-str_FILES = lib/string.c |
