Pigweed
C/C++ API Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
Macros
Pw_must_not_place

Macros

#define PW_MUST_NOT_PLACE(isection)    _PW_MUST_NOT_PLACE(isection, __section_not_place_, __COUNTER__)
 

Detailed Description

Macro Definition Documentation

◆ PW_MUST_NOT_PLACE

#define PW_MUST_NOT_PLACE (   isection)     _PW_MUST_NOT_PLACE(isection, __section_not_place_, __COUNTER__)

PW_MUST_NOT_PLACE is a macro intended for use in linker scripts to ensure inputs are not present. It does the opposite of PW_MUST_PLACE.

This can be used to assert that no data members are added to an object file where there should be none. This is useful to ensure the safety of code that must run before data or bss init.

SECTIONS
{
.zero_init_ram_early_init
{
PW_MUST_NOT_PLACE(*/libearly_memory_init.a:*.o(.bss*));
}
}
#define PW_MUST_NOT_PLACE(isection)
Definition: must_place.ld.h:194

When adding a new variable to a library marked with this macro it is expected to change to PW_MUST_PLACE