Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
 4.1.99
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

Functions

static int llext_get_region_info (const struct llext_loader *ldr, const struct llext *ext, enum llext_mem region, const elf_shdr_t **hdr, const void **addr, size_t *size)
 Get information about a memory region for the specified extension.
 
int llext_section_shndx (const struct llext_loader *ldr, const struct llext *ext, const char *section_name)
 Get the index of a section with the specified name.
 
static int llext_get_section_info (const struct llext_loader *ldr, const struct llext *ext, unsigned int shndx, const elf_shdr_t **hdr, enum llext_mem *region, size_t *offset)
 Get information about a section for the specified extension.
 

Detailed Description

Function Documentation

◆ llext_get_region_info()

static int llext_get_region_info ( const struct llext_loader * ldr,
const struct llext * ext,
enum llext_mem region,
const elf_shdr_t ** hdr,
const void ** addr,
size_t * size )
inlinestatic

#include <zephyr/llext/inspect.h>

Get information about a memory region for the specified extension.

Retrieve information about a region (merged group of similar sections) in the extension. Any output parameter can be NULL if that information is not needed.

Parameters
[in]ldrLoader
[in]extExtension
[in]regionRegion to get information about
[out]hdrVariable storing the pointer to the region header
[out]addrVariable storing the region load address
[out]sizeVariable storing the region size
Returns
0 on success, -EINVAL if the region is invalid

◆ llext_get_section_info()

static int llext_get_section_info ( const struct llext_loader * ldr,
const struct llext * ext,
unsigned int shndx,
const elf_shdr_t ** hdr,
enum llext_mem * region,
size_t * offset )
inlinestatic

#include <zephyr/llext/inspect.h>

Get information about a section for the specified extension.

Retrieve information about an ELF sections in the extension. Any output parameter can be NULL if that information is not needed.

Requires the llext_load_param::keep_section_info flag to be set at extension load time.

Parameters
[in]ldrLoader
[in]extExtension
[in]shndxSection index
[out]hdrVariable storing the pointer to the section header
[out]regionVariable storing the region the section belongs to
[out]offsetVariable storing the offset of the section in the region
Returns
0 on success, -EINVAL if the section index is invalid, -ENOTSUP if section data is not available.

◆ llext_section_shndx()

int llext_section_shndx ( const struct llext_loader * ldr,
const struct llext * ext,
const char * section_name )

#include <zephyr/llext/inspect.h>

Get the index of a section with the specified name.

Requires the llext_load_param::keep_section_info flag to be set at extension load time.

Parameters
[in]ldrLoader
[in]extExtension
[in]section_nameName of the section to look for
Returns
Section index on success, -ENOENT if the section was not found, -ENOTSUP if section data is not available.