2 Replies Latest reply: Mar 22, 2011 5:58 AM by 849281 RSS

    publish executable's symbols to a loaded shared object

      I am trying to load a shared object that should resolve some symbols inside the executable that loaded it:
      program A loads plugin.so which uses method "callback" that exists in program A
      When I try to load the .so I end up with an error:

      undefined symbol: __1cJBugEngineFipath2t6Mpkc_v_

      if I use nm "program" | grep __1cJBugEngineFipath2t6Mpkc_v_:
      0000000000416d20 T __1cJBugEngineFipath2t6Mpkc_v_

      On Linux with the GCC tools, I would normally use the option "-rdynamic":
      "When creating a dynamically linked executable, add all symbols to the dynamic symbol table. The dynamic symbol table is the set of symbols which are visible from dynamic objects at run time."

      but I have read that the linker for suncc automatically exports all symbols as a default.
      Any tip?