Shared Library created with one symbol is not displayed
Posted: Mon Nov 17, 2008 3:19 pm
Hi Eran i have create a shared library as i saw in CODELITE src code and i cannot seem to see its symbols when invoking nm xxx.so
here is the sample code :
#pragma once
#include <wx/dlimpexp.h>
#ifdef WXMAKINGDLL_HOKKU
#define WXDLLIMPEXP_HOKKU extern "C" __declspec(export)
#elif defined(WXUSINGDLL_HOKKU)
#define WXDLLIMPEXP_HOKKU extern "C" __declspec(import)
#else
#define WXDLLIMPEXP_HOKKU
#endif
extern "C" WXDLLIMPEXP_HOKKU int Test();
class WXDLLIMPEXP_HOKKU wxCustomLib
{
public:
wxCustomLib();
~wxCustomLib();
int Test();
};
and here is the result i get when i try nm xxx.so
valentin@ubuntu:~/Desktop/wxHokkuApp/DebugUnicode$ nm wxCustomLib.so
00001eb0 a _DYNAMIC
00001ff4 a _GLOBAL_OFFSET_TABLE_ w _Jv_RegisterClasses
00000604 T _ZN11wxCustomLib4TestEv
000005f2 T _ZN11wxCustomLibC1Ev
000005ec T _ZN11wxCustomLibC2Ev
000005fe T _ZN11wxCustomLibD1Ev
000005f8 T _ZN11wxCustomLibD2Ev
00001ea0 d __CTOR_END__
00001e9c d __CTOR_LIST__
00001ea8 d __DTOR_END__
00001ea4 d __DTOR_LIST__
00000664 r __FRAME_END__
00001eac d __JCR_END__
00001eac d __JCR_LIST__
0000200c A __bss_start w __cxa_finalize@@GLIBC_2.1.3
00000610 t __do_global_ctors_aux
00000530 t __do_global_dtors_aux
00002008 d __dso_handle w __gmon_start__
000005e7 t __i686.get_pc_thunk.bx
0000200c A _edata
00002014 A _end
00000648 T _fini
000004c4 T _init
0000200c b completed.6625
00002010 b dtor_idx.6627
000005b0 t frame_dummy
here is the sample code :
#pragma once
#include <wx/dlimpexp.h>
#ifdef WXMAKINGDLL_HOKKU
#define WXDLLIMPEXP_HOKKU extern "C" __declspec(export)
#elif defined(WXUSINGDLL_HOKKU)
#define WXDLLIMPEXP_HOKKU extern "C" __declspec(import)
#else
#define WXDLLIMPEXP_HOKKU
#endif
extern "C" WXDLLIMPEXP_HOKKU int Test();
class WXDLLIMPEXP_HOKKU wxCustomLib
{
public:
wxCustomLib();
~wxCustomLib();
int Test();
};
and here is the result i get when i try nm xxx.so
valentin@ubuntu:~/Desktop/wxHokkuApp/DebugUnicode$ nm wxCustomLib.so
00001eb0 a _DYNAMIC
00001ff4 a _GLOBAL_OFFSET_TABLE_ w _Jv_RegisterClasses
00000604 T _ZN11wxCustomLib4TestEv
000005f2 T _ZN11wxCustomLibC1Ev
000005ec T _ZN11wxCustomLibC2Ev
000005fe T _ZN11wxCustomLibD1Ev
000005f8 T _ZN11wxCustomLibD2Ev
00001ea0 d __CTOR_END__
00001e9c d __CTOR_LIST__
00001ea8 d __DTOR_END__
00001ea4 d __DTOR_LIST__
00000664 r __FRAME_END__
00001eac d __JCR_END__
00001eac d __JCR_LIST__
0000200c A __bss_start w __cxa_finalize@@GLIBC_2.1.3
00000610 t __do_global_ctors_aux
00000530 t __do_global_dtors_aux
00002008 d __dso_handle w __gmon_start__
000005e7 t __i686.get_pc_thunk.bx
0000200c A _edata
00002014 A _end
00000648 T _fini
000004c4 T _init
0000200c b completed.6625
00002010 b dtor_idx.6627
000005b0 t frame_dummy