Skip to content

Commit

Permalink
Prefer symbols defined in loaded shared objects over the ones in the …
Browse files Browse the repository at this point in the history
…executable

- This prevents the bootstrapped compiler from using a local function, say List.map, when running a testcase that is supposed to test this function


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@19722 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Mar 24, 2014
1 parent 340afbf commit ed42237
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Compiler/runtime/systemimpl.c
Expand Up @@ -1195,7 +1195,11 @@ int SystemImpl__loadLibrary(const char *str, int printDebug)
mmc_GC_function_set_gc_state mmc_GC_set_state_lib_function = NULL;
const char* ctokens[2];
snprintf(libname, MAXPATHLEN, "./%s" CONFIG_DLL_EXT, str);
#if defined(RTLD_DEEPBIND)
h = dlopen(libname, RTLD_LOCAL | RTLD_NOW | RTLD_DEEPBIND);
#else
h = dlopen(libname, RTLD_LOCAL | RTLD_NOW);
#endif
if (h == NULL) {
ctokens[0] = dlerror();
ctokens[1] = libname;
Expand Down

0 comments on commit ed42237

Please sign in to comment.