Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
utils.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <zephyr/toolchain.h>

Go to the source code of this file.

Functions

static bool linker_is_in_rodata (const void *addr)
 Check if address is in a read only section.

Function Documentation

◆ linker_is_in_rodata()

bool linker_is_in_rodata ( const void * addr)
inlinestatic

Check if address is in a read only section.

Checks the default .rodata region as well as any relocated rodata sections (CCM_RODATA, SMEM_RODATA) whose linker symbols are exposed via weak references. This ensures that string literals placed in custom rodata sections by zephyr_code_relocate(LOCATION ..._RODATA) are still recognised as read-only by cbprintf, preventing the deferred-logging packager from NULLing their pointers and appending copies that downstream IPC log transports may not reconstruct correctly.

Parameters
addrAddress.
Returns
True if address identified within any read only section.