33#ifndef __VSF_LOADER_H__
34#define __VSF_LOADER_H__
41#if VSF_USE_LOADER == ENABLED
43#undef __VSF_LOADER_PUBLIC_CONST__
44#if defined(__VSF_LOADER_CLASS_IMPLEMENT)
45# define __VSF_CLASS_IMPLEMENT__
46# define __VSF_LOADER_PUBLIC_CONST__
47#elif defined(__VSF_LOADER_CLASS_INHERIT__)
48# define __VSF_CLASS_INHERIT__
49# define __VSF_LOADER_PUBLIC_CONST__
51# define __VSF_LOADER_PUBLIC_CONST__ const
63#define vsf_loader_read(__target, __offset, __ptr, __size) \
64 (__target)->fn_read((__target), (__offset), (__ptr), (__size))
66#define vsf_loader_malloc(__loader, __attr, __size, __align) \
67 (__loader)->heap_op->fn_malloc((vsf_loader_t *)(__loader), (__attr), (__size), (__align))
68#define vsf_loader_free(__loader, __attr, __ptr) \
69 (__loader)->heap_op->fn_free((vsf_loader_t *)(__loader), (__attr), (__ptr))
186 void * (*alloc_vplt)(
int num);
187 void (*free_vplt)(
void *vplt);
196#if VSF_USE_HEAP == ENABLED
243#if defined(__VSF_LOADER_CLASS_IMPLEMENT) || defined(__VSF_LOADER_CLASS_INHERIT__)
257#undef __VSF_LOADER_CLASS_IMPLEMENT
258#undef __VSF_LOADER_CLASS_INHERIT__
262#if VSF_LOADER_USE_ELF == ENABLED
265#if VSF_LOADER_USE_PE == ENABLED
Definition vsf_loader.h:176
const vsf_loader_heap_op_t vsf_loader_default_heap_op
Definition vsf_loader.c:49
void vsf_loader_cleanup(vsf_loader_t *loader)
Definition vsf_loader.c:114
vsf_loader_mem_attr_t
Definition vsf_loader.h:82
int vsf_loader_load(vsf_loader_t *loader, vsf_loader_target_t *target)
Definition vsf_loader.c:108
void vsf_loader_call_fini_array(vsf_loader_t *loader)
Definition vsf_loader.c:126
uint32_t vsf_loader_xip_read(vsf_loader_target_t *target, uint32_t offset, void *buffer, uint32_t size)
Definition vsf_loader.c:96
void * vsf_loader_remap(vsf_loader_t *loader, void *vaddr)
Definition vsf_loader.c:132
#define __VSF_LOADER_PUBLIC_CONST__
Definition vsf_loader.h:51
int vsf_loader_call_init_array(vsf_loader_t *loader)
Definition vsf_loader.c:120
uint32_t vsf_loader_stdio_read(vsf_loader_target_t *target, uint32_t offset, void *buffer, uint32_t size)
Definition vsf_loader.c:87
@ VSF_LOADER_MEM_X
Definition vsf_loader.h:85
@ VSF_LOADER_MEM_W
Definition vsf_loader.h:84
@ VSF_LOADER_MEM_RWX
Definition vsf_loader.h:87
@ VSF_LOADER_MEM_RW
Definition vsf_loader.h:86
@ VSF_LOADER_MEM_R
Definition vsf_loader.h:83
unsigned int uint32_t
Definition lvgl.h:43
#define vsf_dcl_class
Definition ooc_class.h:46
#define vsf_class(__name)
Definition ooc_class.h:48
uint32_t uintptr_t
Definition stdint.h:38
Definition vsf_loader.h:97
void(* fn_free)(vsf_loader_t *loader, vsf_loader_mem_attr_t attr, void *buffer)
Definition vsf_loader.h:128
Definition vsf_loader.h:167
void(* fn_call_fini_array)(vsf_loader_t *loader)
Definition vsf_loader.h:171
void(* fn_cleanup)(vsf_loader_t *loader)
Definition vsf_loader.h:169
int(* fn_call_init_array)(vsf_loader_t *loader)
Definition vsf_loader.h:170
int(* fn_load)(vsf_loader_t *loader, vsf_loader_target_t *target)
Definition vsf_loader.h:168
Definition vsf_loader.h:132
bool support_xip
Definition vsf_loader.h:147
uintptr_t object
Definition vsf_loader.h:138
uint32_t(* fn_read)(vsf_loader_target_t *target, uint32_t offset, void *buffer, uint32_t size)
Definition vsf_loader.h:164
uint_fast32_t alignment
Definition vsf_heap.h:135
void * vsf_loader_link(vsf_loader_t *loader, const char *name)
Definition vsf_loader.c:103
uint64_t offset
Definition vsf_memfs.h:49
uint32_t size
Definition vsf_memfs.h:50