I have written a simple server program using socket functions.
When compiled with g++
, it gives undefined symbol error for send, __xnet_socket, listen, accept, __xnet_bind.
Why the symbols for socket and bind are different than others.
Also, when the program is compiled using gcc
, this 'xnet
' difference does not happen.
This linking error goes when linked with libsocket.so
.
Actually, I am writing a shared library which overloads these socket API's and intercept them using dlsym()
.
On Solaris, when this library is compiled with gcc, these calls goes through the library, but when compiled with g++
, socket()
and bind()
calls does not gets intercepted, but all other apis goes through the library.
Has libxnet.so
to do something with this?
Can dtrace be of some help?