Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 66d48748 authored by Jack Palevich's avatar Jack Palevich
Browse files

Print out error message when symbol lookup fails.

parent fe20a7ab
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -38,7 +38,14 @@ int run(MainPtr mainFunc, int argc, char** argv) {
}

ACCvoid* symbolLookup(ACCvoid* pContext, const ACCchar* name) {
    return (ACCvoid*) dlsym(RTLD_DEFAULT, name);
    // Call dlerror once to clear out any preexisting error condition.
    (void) dlerror();
    ACCvoid* result = (ACCvoid*) dlsym(RTLD_DEFAULT, name);
    const char* error = dlerror();
    if (error) {
        fprintf(stderr, "%s\"%s\"\n", error, name);
    }
    return result;
}

#ifdef PROVIDE_ARM_DISASSEMBLY