Initial commit

This commit is contained in:
Luke Street 2023-11-18 23:52:51 -05:00
commit c8c516e548
222 changed files with 38483 additions and 0 deletions

22
include/REL/executor.h Normal file
View file

@ -0,0 +1,22 @@
#ifndef REL_EXECUTOR_H
#define REL_EXECUTOR_H
#ifdef __cplusplus
extern "C" {
#endif
extern int _prolog();
extern void _epilog();
typedef void (*VoidFunc)(void);
extern const VoidFunc _ctors[];
extern const VoidFunc _dtors[];
extern void ModuleProlog(void);
extern void ModuleEpilog(void);
#ifdef __cplusplus
}
#endif
#endif /* REL_EXECUTOR_H */

View file

@ -0,0 +1,25 @@
#ifndef _NMWEXCEPTION
#define _NMWEXCEPTION
#ifdef __cplusplus
extern "C" {
#endif
#define DTORCALL(dtor, objptr) (((void (*)(void*, int))dtor)(objptr, -1))
typedef struct DestructorChain {
struct DestructorChain* next;
void* destructor;
void* object;
} DestructorChain;
void __unregister_fragment(int fragmentID);
int __register_fragment(struct __eti_init_info* info, char* TOC);
void* __register_global_object(void* object, void* destructor, void* regmem);
void __destroy_global_chain(void);
#ifdef __cplusplus
}
#endif
#endif // _NMWEXCEPTION