Skip to content

Latest commit

 

History

History
64 lines (43 loc) · 1.6 KB

asserts.md

File metadata and controls

64 lines (43 loc) · 1.6 KB

Asserts

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.

Table of contents

check

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.

Example

asserts:
  - check: boot_ROM_END <= 0x101000
    error_message: boot segment is larger than 1 MiB

Valid values

Non empty string.

error_message

The error message to show if check is not satisfied.

Example

asserts:
  - check: boot_VRAM_END <= 0x80400000
    error_message: VRAM is larger than 4 MiB
    include_if_any: [[ram_size, 4]]

Valid values

Non empty string.

include_if_any, include_if_all, exclude_if_any and exclude_if_all

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.