infix
A JIT-Powered FFI Library for C
Loading...
Searching...
No Matches
loader.c File Reference

Implements the cross-platform dynamic library loading and symbol resolution API. More...

#include "common/infix_internals.h"
#include <dlfcn.h>
Include dependency graph for loader.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  infix_library_t
 

Functions

c23_nodiscard infix_library_tinfix_library_open (const char *path)
 Opens a dynamic library and returns a handle to it.
 
void infix_library_close (infix_library_t *lib)
 Closes a dynamic library handle and unloads it.
 
c23_nodiscard void * infix_library_get_symbol (infix_library_t *lib, const char *symbol_name)
 Retrieves the memory address of a symbol (function or global variable).
 
c23_nodiscard infix_status infix_read_global (infix_library_t *lib, const char *symbol_name, const char *type_signature, void *buffer)
 Reads the value of a global variable from a loaded library.
 
c23_nodiscard infix_status infix_write_global (infix_library_t *lib, const char *symbol_name, const char *type_signature, void *buffer)
 Writes a value to a global variable in a loaded library.
 

Detailed Description

Implements the cross-platform dynamic library loading and symbol resolution API.

Copyright (c) 2025 Sanko Robinson

This source code is dual-licensed under the Artistic License 2.0 or the MIT License. You may choose to use this code under the terms of either license.

SPDX-License-Identifier: (Artistic-2.0 OR MIT)

The documentation blocks within this file are licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).

SPDX-License-Identifier: CC-BY-4.0