mirror of
https://git.proxmox.com/git/efi-boot-shim
synced 2025-06-01 13:00:02 +00:00

This moves them both to be computed at runtime from a pointer+offset rather than just a pointer, so that their real address can be entirely derived from the section they're in. This means you can replace the whole .vendor_cert section with a new one with certs that don't have the same size.
68 lines
1.4 KiB
ArmAsm
68 lines
1.4 KiB
ArmAsm
.globl cert_table
|
|
.data
|
|
.align 16
|
|
.type cert_table, @object
|
|
.size cert_table, 4
|
|
.section .vendor_cert, "a", @progbits
|
|
cert_table:
|
|
#if defined(VENDOR_CERT_FILE)
|
|
.long vendor_cert_priv_end - vendor_cert_priv
|
|
#else
|
|
.long 0
|
|
#endif
|
|
#if defined(VENDOR_DBX_FILE)
|
|
.long vendor_dbx_priv_end - vendor_dbx_priv
|
|
#else
|
|
.long 0
|
|
#endif
|
|
.long vendor_cert_priv - cert_table
|
|
.long vendor_dbx_priv - cert_table
|
|
#if defined(VENDOR_CERT_FILE)
|
|
.data
|
|
.align 1
|
|
.type vendor_cert_priv, @object
|
|
.size vendor_cert_priv, vendor_cert_priv_end-vendor_cert_priv
|
|
.section .vendor_cert, "a", @progbits
|
|
vendor_cert_priv:
|
|
.incbin VENDOR_CERT_FILE
|
|
vendor_cert_priv_end:
|
|
#else
|
|
.bss
|
|
.type vendor_cert_priv, @object
|
|
.size vendor_cert_priv, 1
|
|
.section .vendor_cert, "a", @progbits
|
|
vendor_cert_priv:
|
|
.zero 1
|
|
|
|
.data
|
|
.align 4
|
|
.type vendor_cert_size_priv, @object
|
|
.size vendor_cert_size_priv, 4
|
|
.section .vendor_cert, "a", @progbits
|
|
vendor_cert_priv_end:
|
|
#endif
|
|
#if defined(VENDOR_DBX_FILE)
|
|
.data
|
|
.align 1
|
|
.type vendor_dbx_priv, @object
|
|
.size vendor_dbx_priv, vendor_dbx_priv_end-vendor_dbx_priv
|
|
.section .vendor_cert, "a", @progbits
|
|
vendor_dbx_priv:
|
|
.incbin VENDOR_DBX_FILE
|
|
vendor_dbx_priv_end:
|
|
#else
|
|
.bss
|
|
.type vendor_dbx_priv, @object
|
|
.size vendor_dbx_priv, 1
|
|
.section .vendor_cert, "a", @progbits
|
|
vendor_dbx_priv:
|
|
.zero 1
|
|
|
|
.data
|
|
.align 4
|
|
.type vendor_dbx_size_priv, @object
|
|
.size vendor_dbx_size_priv, 4
|
|
.section .vendor_cert, "a", @progbits
|
|
vendor_dbx_priv_end:
|
|
#endif
|