libtransistor
A userland library for the Nintendo Switch
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Typedefs | Functions
ld.h File Reference

Dynamic linking functions. More...

#include <libtransistor/types.h>
Include dependency graph for ld.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  module_input_t
 

Typedefs

typedef struct module_t module_t
 
typedef struct ld_loader_t ld_loader_t
 

Functions

result_t ld_relocate_module_basic (uint8_t *module_base)
 Perform basic relocations on a module.
 
result_t ld_add_module (module_input_t input, module_t **out)
 Adds a loaded module to the end of the processing queue. More...
 
result_t ld_discover_module (const char *name, module_t **out, bool is_global)
 Discovers a module in the filesystem, loads it, and adds it to the processing queue. More...
 
result_t ld_decref_module (module_t *module)
 Decrements the module's reference count and finalizes, unloads, and destroys it if it has reached zero.
 
result_t ld_process_modules ()
 Processes all modules in the queue.
 
void ld_finalize ()
 

Detailed Description

Dynamic linking functions.

Function Documentation

result_t ld_add_module ( module_input_t  input,
module_t **  out 
)

Adds a loaded module to the end of the processing queue.

Parameters
is_globalWhether or not to also add it to the load-order for symbol resolution in relocation processing.
result_t ld_discover_module ( const char *  name,
module_t **  out,
bool  is_global 
)

Discovers a module in the filesystem, loads it, and adds it to the processing queue.

Parameters
is_globalWhether or not this module and its dependencies will provide symbols usable for relocation processing.