Skip to content

Commit c33453d

Browse files
vittyvkardbiesheuvel
authored andcommitted
efi: Drop preprocessor directives from zboot.lds
Older versions of `ld` don't seem to support preprocessor directives in linker scripts, e.g. on RHEL9's ld-2.35.2-63.el9 the build fails with: ld:./drivers/firmware/efi/libstub/zboot.lds:32: ignoring invalid character `#' in expression ld:./drivers/firmware/efi/libstub/zboot.lds:33: syntax error We don't seem to need these '#ifdef', no empty .sbat section is created when CONFIG_EFI_SBAT_FILE="": # objdump -h arch/arm64/boot/vmlinuz.efi arch/arm64/boot/vmlinuz.efi: file format pei-aarch64-little Sections: Idx Name Size VMA LMA File off Algn 0 .text 00b94000 0000000000001000 0000000000001000 00001000 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .data 00000200 0000000000b95000 0000000000b95000 00b95000 2**2 CONTENTS, ALLOC, LOAD, DATA Fixes: 0f9a173 ("efi: zboot specific mechanism for embedding SBAT section") Signed-off-by: Vitaly Kuznetsov <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent 19272b3 commit c33453d

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/firmware/efi/libstub/zboot.lds

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,12 @@ SECTIONS
2929
. = _etext;
3030
}
3131

32-
#ifdef CONFIG_EFI_SBAT
3332
.sbat : ALIGN(4096) {
3433
_sbat = .;
3534
*(.sbat)
3635
_esbat = ALIGN(4096);
3736
. = _esbat;
3837
}
39-
#endif
4038

4139
.data : ALIGN(4096) {
4240
_data = .;

0 commit comments

Comments
 (0)