lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hi list !

I am working on the Linux port of Lubyk and am stuck with some differences between OS X and Linux regarding symbols in shared objects:

I have two shared objects "" and "". The "" library defines "lubyk::Thread" (C++ wrapper around POSIX threads). The "" library defines "lk::Thread" (C++ class to be used with Lua).

On OS X, everything works fine as long as "" is loaded before "" but on Linux, the lua crashes with undefined symbols.

By looking at the symbol map, the missing symbol corresponds to the typeinfo for "lubyk::Thread" which is defined as:

========== OS X
S __ZTIN5lubyk6ThreadE

U __ZTIN5lubyk6ThreadE

========== Linux (Ubuntu 10.10)
V _ZTIN5lubyk6ThreadE

U _ZTIN5lubyk6ThreadE

From the man pages of "nm", the "V" stands for "weak object" but I have no clue as of why it is marked as such on Linux (the source code can be found here: [1]).

Any help would be greatly appreciated...


[1] (modules "lubyk" and "lk")