| adm | Find | login register |
eliu joined: 2007-08-09 posted: 11474 promoted: 617 bookmarked: 187 新竹, 台灣 |
For a dynamic library .so file , we can use dlopen(), dlsym() to call functions inside a .so file. Can the functions in .so call functions in main() executable? Most of the time it works, but not always. It's not very reliable. A reliable way to let functions in .so call functions in main() executable is to save the fucntion address as a struct, and pass it to a .so initial function and .so save it.
edited: 3
| |||||||||||||
eliu joined: 2007-08-09 posted: 11474 promoted: 617 bookmarked: 187 新竹, 台灣 |
to check external reference functions in .so, use 'nm file.so' . The functions with 'U' are undefined external functions. $nm xxxx.so 00004daa t disp_select 0000aa10 b event_box_anthy |
| adm | Find | login register |