NAME
SECTION,
SECTION_ITERATE —
section macros
SYNOPSIS
#include
<libks/section.h>
SECTION(name);
int
SECTION_ITERATE(type
*it, name);
DESCRIPTION
The section macros can be used to store and access data in custom binary sections.
The
SECTION()
macro is used to annotate that a variable resides in the section identified
by name.
The
SECTION_ITERATE()
macro iterates over all elements stored in the section identified by
name in which each element is expected to be of
type. The current element can be accessed through
it which must be zero initialized upon the first
invocation.
EXAMPLES
static struct element SECTION(elements); const struct element *it = NULL; while (SECTION_ITERATE(it, elements)) handle_element(it);
AUTHORS
Anton Lindqvist <anton@basename.se>