I tried to trace evince-3.28.4 execution using GDB. There is a callq instruction at some point in libdl, which is shown below (i.e., at _dl_lookup_symbol_x+840): When the execution reaches here, the backtrace is as follows: But when I enter ni (to jump to the next assembly instruction), it turns into this: As can be seen, after a simple call and
Tag: libdl
How can “plugins” loaded by libdl refer to symbols in the program which loaded them?
Imagine that you have an application with a plugin based architecture, where each plugin is a *.so file that is dynamically loaded with dlopen(). The main application can refer to symbols via dlsym(), and so it may call functions of the plugin. How can the plugin call functions of the main application? I know that the main application could provide