An assert ensures that a given condition is satified by the linking process, otherwise fail the link.
GNU LD documentation for
ASSERT
Every attribute listed is optional unless explicitly stated.
This field is required.
The actual condition to check. If this check evaluates to zero then the linker
exits with an error code and prints error_message
.
asserts:
- check: boot_ROM_END <= 0x101000
error_message: boot segment is larger than 1 MiB
Non empty string.
The error message to show if check
is not satisfied.
asserts:
- check: boot_VRAM_END <= 0x80400000
error_message: VRAM is larger than 4 MiB
include_if_any: [[ram_size, 4]]
Non empty string.
These fields allow to conditionally include or exclude a given segment depending on the current custom options.
Their syntax is the same as their file
counterparts.