R
rippul
Hi,
Here is my problem,
Our project is initially written in C due to making compatibility with
the 3rd party API that we are using.
Later on due to addition of new features developers added these
features in C++ code. Hence we converted all of our C file to CPP by
changing their c extension to cpp and by some minor changes.
Our code structure is as follows,
Basically we have around 6 sub modules (which are common to) which we
are building as a static library and later we are linking all these 6
archives along with the 3rd party libraries to create a shared object.
Here is the compiler command line options that we are using
============================================================
/usr/bin/c++ -o ../../bin/Linux/ds-wac-apache2.2.so apache2.2Entry.o
-shared -L../../lib/Linux -lwac_common -lea_connpool -lea_message -
ltcp -lds_logs -ltcp -lds_logs -lwac_shmem -Wl,-G -L/usr/lib/gcc/i386-
redhat-linux/3.4.3 -lstdc++ -L../../../../../../../3rd_party/
Mozilla_SDK/6.0.6/UNIX/RedHatLinux-4/Mozilla_SDK/lib -lnss3 -
lnssutil3 -lldif60 -lldap60 -lssldap60 -lprldap60 -lssl3 -lplc4 -
lplds4 -lnspr4 -lsoftokn3 -lsqlite3 -L../../../../../../../3rd_party/
openssl/0.9.8d/UNIX/RedHatLinux-4/openssl/lib -lssl -lcrypto -
lpthread
============================================================
But the problem is that when we are loading our shared library at the
run time our code stops processing at the particular line that we
checked with the generated trace file, which is something lime
“CAccessLog *pAccessLog = new CAccessLog();”.
We checked with the nm command about the class constructor
(CAccessLog) it is showing as weak object.
In our code we are creating an object of a class(pAccessLog) from a
file which is originally in C, now we converted the extension to cpp.
I have attached the output of the nm command (nm -a * *.a | grep
CAccessLog)
============================================================================
00000000 d .data.rel.ro._ZTI10CAccessLog
00000000 d .data.rel.ro._ZTV10CAccessLog
00000000 r .rodata._ZTS10CAccessLog
00000000 T _ZN10CAccessLog10initializeEv
00000690 T _ZN10CAccessLog12setAuthLevelEPKc
000001e0 T _ZN10CAccessLog13getLogMessageEv
00000080 T _ZN10CAccessLog14getSignMessageEv
00000630 T _ZN10CAccessLog14setDescriptionEPKc
00000750 T _ZN10CAccessLog15setWebServiceCnEPKc
000007b0 T _ZN10CAccessLog15setWebServiceDnEPKc
000005d0 T _ZN10CAccessLog16setGrantedAccessEPKc
00000550 T _ZN10CAccessLog16setGrantedAccessEb
00000040 T _ZN10CAccessLog19encodeAccessLogDataEPc
000006f0 T _ZN10CAccessLog6setURLEPKc
00000810 T _ZN10CAccessLog9setUserIpEPKc
00000a10 T _ZN10CAccessLogC1Ev
00000a70 T _ZN10CAccessLogC2Ev
00000870 T _ZN10CAccessLogD1Ev
00000940 T _ZN10CAccessLogD2Ev
00000000 V _ZTI10CAccessLog
00000000 V _ZTS10CAccessLog
00000000 V _ZTV10CAccessLog
000000a0 T _Z17populateAccessLogP10CAccessLogP10AuthData_tPc
U _Z18SubmitWACAccessLogPc
U _ZN10CAccessLog12setAuthLevelEPKc
U _ZN10CAccessLog13getLogMessageEv
U _ZN10CAccessLog14setDescriptionEPKc
U _ZN10CAccessLog15setWebServiceCnEPKc
U _ZN10CAccessLog15setWebServiceDnEPKc
U _ZN10CAccessLog16setGrantedAccessEb
U _ZN10CAccessLog19encodeAccessLogDataEPc
U _ZN10CAccessLog6setURLEPKc
U _ZN10CAccessLog9setUserIpEPKc
U _ZN10CAccessLogC1Ev
U _ZN10CAccessLogD1Ev
U _Z18SubmitWACAccessLogPc
00000000 d .data.rel.ro._ZTI10CAccessLog
00000000 d .data.rel.ro._ZTV10CAccessLog
00000000 r .rodata._ZTS10CAccessLog
00000000 T _ZN10CAccessLog10initializeEv
00000690 T _ZN10CAccessLog12setAuthLevelEPKc
000001e0 T _ZN10CAccessLog13getLogMessageEv
00000080 T _ZN10CAccessLog14getSignMessageEv
00000630 T _ZN10CAccessLog14setDescriptionEPKc
00000750 T _ZN10CAccessLog15setWebServiceCnEPKc
000007b0 T _ZN10CAccessLog15setWebServiceDnEPKc
000005d0 T _ZN10CAccessLog16setGrantedAccessEPKc
00000550 T _ZN10CAccessLog16setGrantedAccessEb
00000040 T _ZN10CAccessLog19encodeAccessLogDataEPc
000006f0 T _ZN10CAccessLog6setURLEPKc
00000810 T _ZN10CAccessLog9setUserIpEPKc
00000a10 T _ZN10CAccessLogC1Ev
00000a70 T _ZN10CAccessLogC2Ev
00000870 T _ZN10CAccessLogD1Ev
00000940 T _ZN10CAccessLogD2Ev
00000000 V _ZTI10CAccessLog
00000000 V _ZTS10CAccessLog
00000000 V _ZTV10CAccessLog
000000a0 T _Z17populateAccessLogP10CAccessLogP10AuthData_tPc
U _Z18SubmitWACAccessLogPc
U _ZN10CAccessLog12setAuthLevelEPKc
U _ZN10CAccessLog13getLogMessageEv
U _ZN10CAccessLog14setDescriptionEPKc
U _ZN10CAccessLog15setWebServiceCnEPKc
U _ZN10CAccessLog15setWebServiceDnEPKc
U _ZN10CAccessLog16setGrantedAccessEb
U _ZN10CAccessLog19encodeAccessLogDataEPc
U _ZN10CAccessLog6setURLEPKc
U _ZN10CAccessLog9setUserIpEPKc
U _ZN10CAccessLogC1Ev
U _ZN10CAccessLogD1Ev
U _Z18SubmitWACAccessLogPc
============================================================================
I am also some confused by this kind of the output that I cant
understand easily.
Can someone Please help me on the same.
Any help will be hearty appreciated.
Here is my problem,
Our project is initially written in C due to making compatibility with
the 3rd party API that we are using.
Later on due to addition of new features developers added these
features in C++ code. Hence we converted all of our C file to CPP by
changing their c extension to cpp and by some minor changes.
Our code structure is as follows,
Basically we have around 6 sub modules (which are common to) which we
are building as a static library and later we are linking all these 6
archives along with the 3rd party libraries to create a shared object.
Here is the compiler command line options that we are using
============================================================
/usr/bin/c++ -o ../../bin/Linux/ds-wac-apache2.2.so apache2.2Entry.o
-shared -L../../lib/Linux -lwac_common -lea_connpool -lea_message -
ltcp -lds_logs -ltcp -lds_logs -lwac_shmem -Wl,-G -L/usr/lib/gcc/i386-
redhat-linux/3.4.3 -lstdc++ -L../../../../../../../3rd_party/
Mozilla_SDK/6.0.6/UNIX/RedHatLinux-4/Mozilla_SDK/lib -lnss3 -
lnssutil3 -lldif60 -lldap60 -lssldap60 -lprldap60 -lssl3 -lplc4 -
lplds4 -lnspr4 -lsoftokn3 -lsqlite3 -L../../../../../../../3rd_party/
openssl/0.9.8d/UNIX/RedHatLinux-4/openssl/lib -lssl -lcrypto -
lpthread
============================================================
But the problem is that when we are loading our shared library at the
run time our code stops processing at the particular line that we
checked with the generated trace file, which is something lime
“CAccessLog *pAccessLog = new CAccessLog();”.
We checked with the nm command about the class constructor
(CAccessLog) it is showing as weak object.
In our code we are creating an object of a class(pAccessLog) from a
file which is originally in C, now we converted the extension to cpp.
I have attached the output of the nm command (nm -a * *.a | grep
CAccessLog)
============================================================================
00000000 d .data.rel.ro._ZTI10CAccessLog
00000000 d .data.rel.ro._ZTV10CAccessLog
00000000 r .rodata._ZTS10CAccessLog
00000000 T _ZN10CAccessLog10initializeEv
00000690 T _ZN10CAccessLog12setAuthLevelEPKc
000001e0 T _ZN10CAccessLog13getLogMessageEv
00000080 T _ZN10CAccessLog14getSignMessageEv
00000630 T _ZN10CAccessLog14setDescriptionEPKc
00000750 T _ZN10CAccessLog15setWebServiceCnEPKc
000007b0 T _ZN10CAccessLog15setWebServiceDnEPKc
000005d0 T _ZN10CAccessLog16setGrantedAccessEPKc
00000550 T _ZN10CAccessLog16setGrantedAccessEb
00000040 T _ZN10CAccessLog19encodeAccessLogDataEPc
000006f0 T _ZN10CAccessLog6setURLEPKc
00000810 T _ZN10CAccessLog9setUserIpEPKc
00000a10 T _ZN10CAccessLogC1Ev
00000a70 T _ZN10CAccessLogC2Ev
00000870 T _ZN10CAccessLogD1Ev
00000940 T _ZN10CAccessLogD2Ev
00000000 V _ZTI10CAccessLog
00000000 V _ZTS10CAccessLog
00000000 V _ZTV10CAccessLog
000000a0 T _Z17populateAccessLogP10CAccessLogP10AuthData_tPc
U _Z18SubmitWACAccessLogPc
U _ZN10CAccessLog12setAuthLevelEPKc
U _ZN10CAccessLog13getLogMessageEv
U _ZN10CAccessLog14setDescriptionEPKc
U _ZN10CAccessLog15setWebServiceCnEPKc
U _ZN10CAccessLog15setWebServiceDnEPKc
U _ZN10CAccessLog16setGrantedAccessEb
U _ZN10CAccessLog19encodeAccessLogDataEPc
U _ZN10CAccessLog6setURLEPKc
U _ZN10CAccessLog9setUserIpEPKc
U _ZN10CAccessLogC1Ev
U _ZN10CAccessLogD1Ev
U _Z18SubmitWACAccessLogPc
00000000 d .data.rel.ro._ZTI10CAccessLog
00000000 d .data.rel.ro._ZTV10CAccessLog
00000000 r .rodata._ZTS10CAccessLog
00000000 T _ZN10CAccessLog10initializeEv
00000690 T _ZN10CAccessLog12setAuthLevelEPKc
000001e0 T _ZN10CAccessLog13getLogMessageEv
00000080 T _ZN10CAccessLog14getSignMessageEv
00000630 T _ZN10CAccessLog14setDescriptionEPKc
00000750 T _ZN10CAccessLog15setWebServiceCnEPKc
000007b0 T _ZN10CAccessLog15setWebServiceDnEPKc
000005d0 T _ZN10CAccessLog16setGrantedAccessEPKc
00000550 T _ZN10CAccessLog16setGrantedAccessEb
00000040 T _ZN10CAccessLog19encodeAccessLogDataEPc
000006f0 T _ZN10CAccessLog6setURLEPKc
00000810 T _ZN10CAccessLog9setUserIpEPKc
00000a10 T _ZN10CAccessLogC1Ev
00000a70 T _ZN10CAccessLogC2Ev
00000870 T _ZN10CAccessLogD1Ev
00000940 T _ZN10CAccessLogD2Ev
00000000 V _ZTI10CAccessLog
00000000 V _ZTS10CAccessLog
00000000 V _ZTV10CAccessLog
000000a0 T _Z17populateAccessLogP10CAccessLogP10AuthData_tPc
U _Z18SubmitWACAccessLogPc
U _ZN10CAccessLog12setAuthLevelEPKc
U _ZN10CAccessLog13getLogMessageEv
U _ZN10CAccessLog14setDescriptionEPKc
U _ZN10CAccessLog15setWebServiceCnEPKc
U _ZN10CAccessLog15setWebServiceDnEPKc
U _ZN10CAccessLog16setGrantedAccessEb
U _ZN10CAccessLog19encodeAccessLogDataEPc
U _ZN10CAccessLog6setURLEPKc
U _ZN10CAccessLog9setUserIpEPKc
U _ZN10CAccessLogC1Ev
U _ZN10CAccessLogD1Ev
U _Z18SubmitWACAccessLogPc
============================================================================
I am also some confused by this kind of the output that I cant
understand easily.
Can someone Please help me on the same.
Any help will be hearty appreciated.