EXTRACLEAN = $(_OBJPREFIX)_stublib.o
INCFILES := sys/sys.h
-CFLAGS = -g -Wall -fno-builtin -fno-stack-protector -fPIC
+CFLAGS = -g -Wall -fno-builtin -fno-stack-protector -fPIC -std=c99
# -fno-leading-underscore
CFLAGS += $(CPPFLAGS)
LDFLAGS = -g -T arch/$(ARCHDIR).ld -Map map.txt --export-dynamic
void *_crt0_exit_handler;
void abort(void){}
+void ldacess_DumpLoadedLibraries(void){}
extern int32_t __modsi3(int32_t Num, int32_t Den);
extern uint32_t __udivsi3(uint32_t Num, uint32_t Den);
extern uint32_t __umodsi3(uint32_t Num, uint32_t Den);
+extern void ldacess_DumpLoadedLibraries(void);
#define _STR(x) #x
#define STR(x) _STR(x)
} caLocalExports[] = {
EXP(gLoadedLibraries),
EXP(_errno),
+ EXP(ldacess_DumpLoadedLibraries),
#define __ASSEMBLER__
#include "arch/syscalls.s.h"
//tLoadLib *gpLoadedLibraries = NULL;
// === CODE ===
+void ldacess_DumpLoadedLibraries(void)
+{
+ for( int i = 0; i < MAX_LOADED_LIBRARIES; i ++ )
+ {
+ if(gLoadedLibraries[i].Base == 0) break; // Last entry has Base set to NULL
+ _SysDebug("%p: %s",
+ gLoadedLibraries[i].Base,
+ gLoadedLibraries[i].Name
+ );
+ }
+}
+
const char *FindLibrary(char *DestBuf, const char *SoName, const char *ExtraSearchDir)
{
// -- #1: Executable Specified