Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - libsocket in QNX 6.5.0: (5 Items)
   
libsocket in QNX 6.5.0  
Using QNX Neutrino 6.5.0, I notice that there is a new libsocket version, libsocket.so.3, in addition to libsocket.so.2

However, a simple test shows that linking against "-lsocket" will include both libsocket.so.2 _and_ libsocket.so.3:
13:22:22-dspadaro@EXV2:~/builds/tot/source/configurations/QNX-PPC/test/ppc/be> ntoppc-strings test | grep lib.*\.so
/usr/lib/ldqnx.so.2
libsocket.so.3
libc.so.3
libsocket.so.2  

I guess I was assuming that when the version number incremented the functionality would be a superset.  It would be nice
 if we did not have to carry forward 2 versions of this library.  Does anyone know of a trick (or a reason not) to do 
this?
Re: libsocket in QNX 6.5.0  
Do an 'objdump -x | grep NEEDED' on the various libs.  Something must not have been re-linked.  In general only the .3 
should be needed.

Regards,

-seanb

----- Original Message -----
From: Derek Spadaro [mailto:community-noreply@qnx.com]
Sent: Tuesday, May 10, 2011 02:25 PM
To: technology-networking <post85557@community.qnx.com>
Subject: libsocket in QNX 6.5.0

Using QNX Neutrino 6.5.0, I notice that there is a new libsocket version, libsocket.so.3, in addition to libsocket.so.2

However, a simple test shows that linking against "-lsocket" will include both libsocket.so.2 _and_ libsocket.so.3:
13:22:22-dspadaro@EXV2:~/builds/tot/source/configurations/QNX-PPC/test/ppc/be> ntoppc-strings test | grep lib.*\.so
/usr/lib/ldqnx.so.2
libsocket.so.3
libc.so.3
libsocket.so.2  

I guess I was assuming that when the version number incremented the functionality would be a superset.  It would be nice
 if we did not have to carry forward 2 versions of this library.  Does anyone know of a trick (or a reason not) to do 
this?



_______________________________________________

Technology
http://community.qnx.com/sf/go/post85557
Re: libsocket in QNX 6.5.0  
OK. 

13:46:42-dspadaro@EXV2:/opt/qnx650/target/qnx6/ppcbe/lib> ls *.so *.so.* | xargs objdump -x | grep NEEDED 
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.2
  NEEDED               libc.so.3
  NEEDED               libc.so.2
  NEEDED               libc.so.2
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.2
  NEEDED               libc.so.3
  NEEDED               libc.so.2
  NEEDED               libc.so.2
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libm.so.2
  NEEDED               libc.so.3
  NEEDED               libm.so.2
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libsocket.so.3
  NEEDED               libc.so.3
  NEEDED               libsocket.so.3
  NEEDED               libc.so.3

Nothing obvious there, but I was looking as much to confirm that .2 is not required as anything.  We have 6.4.1 and 6.5.
0 toolchains co-existing on the same machines, so I will assume somebody is pointing where they needn't be and try to 
track it down.  
Thanks.
Re: libsocket in QNX 6.5.0  
I mean all the libs in your test.

----- Original Message -----
From: Derek Spadaro [mailto:community-noreply@qnx.com]
Sent: Tuesday, May 10, 2011 02:52 PM
To: technology-networking <post85559@community.qnx.com>
Subject: Re: libsocket in QNX 6.5.0

OK. 

13:46:42-dspadaro@EXV2:/opt/qnx650/target/qnx6/ppcbe/lib> ls *.so *.so.* | xargs objdump -x | grep NEEDED 
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.2
  NEEDED               libc.so.3
  NEEDED               libc.so.2
  NEEDED               libc.so.2
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.2
  NEEDED               libc.so.3
  NEEDED               libc.so.2
  NEEDED               libc.so.2
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libm.so.2
  NEEDED               libc.so.3
  NEEDED               libm.so.2
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libc.so.3
  NEEDED               libsocket.so.3
  NEEDED               libc.so.3
  NEEDED               libsocket.so.3
  NEEDED               libc.so.3

Nothing obvious there, but I was looking as much to confirm that .2 is not required as anything.  We have 6.4.1 and 6.5.
0 toolchains co-existing on the same machines, so I will assume somebody is pointing where they needn't be and try to 
track it down.  
Thanks.



_______________________________________________

Technology
http://community.qnx.com/sf/go/post85559
Re: libsocket in QNX 6.5.0  
My fault, I wasn't clear.  That directory did contain all the libraries from my test.  The test is just a one-liner that
 calls socket().  But now I think the issue is at least partially how we are looking for dependencies (by parsing the 
output of ntoppc-strings).

objdump the test executable and I see

...
Dynamic Section:
  NEEDED               libsocket.so.3
  NEEDED               libc.so.3
  INIT                 0x480404d0
  FINI                 0x48040888
  HASH                 0x48040128
  STRTAB               0x480402f0
  SYMTAB               0x480401c0
  STRSZ                0x000000e5
  SYMENT               0x00000010
  DEBUG                0x00000000
  PLTGOT               0x480419d8
  PLTRELSZ             0x00000078
  PLTREL               0x00000007
  JMPREL               0x48040458
  RELA                 0x4804041c
  RELASZ               0x000000b4
  RELAENT              0x0000000c
  VERNEED              0x480403fc
  VERNEEDNUM           0x00000001
  VERSYM               0x480403d6

Version References:
  required from libsocket.so.3:
    0x040fdf22 0x00 02 libsocket.so.2
...


So libsocket.so.3 somehow still points back to .2.  objdump libsocket.so.3 and I see

...
Dynamic Section:
  NEEDED               libc.so.3
  SONAME               libsocket.so.3
  INIT                 0x00006fb8
  FINI                 0x00029618
  HASH                 0x000000f4
  STRTAB               0x000027c8
  SYMTAB               0x00000c08
  STRSZ                0x00000f76
  SYMENT               0x00000010
  PLTGOT               0x0002e780
  PLTRELSZ             0x00000984
  PLTREL               0x00000007
  JMPREL               0x00006634
  RELA                 0x00003af0
  RELASZ               0x000034c8
  RELAENT              0x0000000c
  VERDEF               0x00003ab8
  VERDEFNUM            0x00000002
  VERSYM               0x0000373e
  RELACOUNT            0x0000038d

Version definitions:
1 0x01 0x040fdf23 libsocket.so.3
2 0x00 0x040fdf22 libsocket.so.2
...

I don't have enough ELF knowledge to know if this is a problem, how to fix it, etc.  But from the previous post it 
sounds like the libsocket.so.2 pointer here can be safely ignored.