aboutsummaryrefslogtreecommitdiff
path: root/examples/system
diff options
context:
space:
mode:
authorspicyjpeg <88942473+spicyjpeg@users.noreply.github.com>2021-10-19 22:30:21 +0200
committerspicyjpeg <88942473+spicyjpeg@users.noreply.github.com>2021-10-20 16:57:14 +0200
commit4e0d5bceb24042a6d31c76958ce2c6157369ac68 (patch)
tree20d3110363ab468e99502337c0a46852662bb365 /examples/system
parent7a2e6dd9550376f7a0511e73b33194170d712384 (diff)
downloadpsn00bsdk-4e0d5bceb24042a6d31c76958ce2c6157369ac68.tar.gz
libc build fix, replaced dlerror() strings with enum
Diffstat (limited to 'examples/system')
-rw-r--r--examples/system/dynlink/main.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/system/dynlink/main.c b/examples/system/dynlink/main.c
index 70314da..33f6f44 100644
--- a/examples/system/dynlink/main.c
+++ b/examples/system/dynlink/main.c
@@ -62,7 +62,9 @@ const void *const DO_NOT_STRIP[] __attribute__((section(".dummy"))) = {
&InitGeom,
&RotMatrix,
&TransMatrix,
- &MulMatrix0
+ &MulMatrix0,
+ &GetTimInfo,
+ &LoadImage
};
static const char *const DLL_FILENAMES[] = {
@@ -141,7 +143,7 @@ void load_dll(const char *filename) {
dll = dlopen(filename, RTLD_LAZY);
if (!dll)
- SHOW_ERROR("FAILED TO LOAD %s\n%s\n", filename, dlerror());
+ SHOW_ERROR("FAILED TO LOAD %s\nERROR=%d\n", filename, (int32_t) dlerror());
dll_api.init = dlsym(dll, "init");
dll_api.render = dlsym(dll, "render");
@@ -168,12 +170,12 @@ int main(int argc, const char* argv[]) {
SHOW_STATUS("LOADING SYMBOL MAP\n");
if (!DL_LoadSymbolMap("cdrom:MAIN.MAP;1"))
- SHOW_ERROR("FAILED TO LOAD SYMBOL MAP\n%s\n", dlerror());
+ SHOW_ERROR("FAILED TO LOAD SYMBOL MAP\nERROR=%d\n", (int32_t) dlerror());
// Try to obtain a reference to a local function.
void (*_display)() = DL_GetSymbolByName("display");
if (!_display)
- SHOW_ERROR("FAILED TO LOOK UP LOCAL FUNCTION\n%s\n", dlerror());
+ SHOW_ERROR("FAILED TO LOOK UP LOCAL FUNCTION\nERROR=%d\n", (int32_t) dlerror());
printf("Symbol map test, display() @ %08x\n", _display);