libtransistor
A userland library for the Nintendo Switch
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
internal.h
Go to the documentation of this file.
1 
6 #pragma once
7 
9 #include<libtransistor/ld/ld.h>
10 #include<libtransistor/ld/elf.h>
12 
13 #include<stdint.h>
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 extern trn_list_head_t ld_module_list_head;
20 
21 typedef struct {
22  uint32_t magic, dynamic_off, bss_start_off, bss_end_off;
23  uint32_t unwind_start_off, unwind_end_off, module_object_off;
24 } module_header_t; // Nintendo's MOD0 struct
25 
35 result_t ld_resolve_load_symbol(module_t *find_mod, const char *find_name, Elf64_Sym **def, module_t **defining_module);
36 
46 result_t ld_resolve_dependency_symbol(module_t *find_mod, const char *find_name, Elf64_Sym **def, module_t **defining_module);
47 
48 #ifdef __cplusplus
49 }
50 #endif
Dynamic linking functions.
Definition: list.h:16
Definition: module.h:32
uint32_t result_t
Function result.
Definition: types.h:51
Lists Inspired by the concepts of the Linux kernel list API.
ELF structures.
Definition: internal.h:21
Definition: elf.h:37
Module structure and operations for internal use in the dynamic linker.