Shared Utilities

group Shared Utility Macros

Cross-cutting compiler and linker utility macros for Chimera-SDK.

Defines

KEEP

Prevents the compiler and linker from discarding a symbol.

Combines __attribute__((used)) (tells the compiler to emit the symbol even if it appears unreferenced) with __attribute__((retain)) on toolchains that support it (prevents the linker from garbage-collecting the section). Falls back to used alone on older toolchains.

Use on symbols that are referenced only from assembly (e.g. trampolines, interrupt vectors) or from linker scripts.