[csw-users] 64bit g++ 4.7.2 exception handling ...

James Lee james at opencsw.org
Thu Mar 21 11:06:49 CET 2013


On 21/03/2013 09:51, Dmitri Shubin wrote:
> Please check libstdc++.so
>
> I have the following:
>
> $ ldd /opt/csw/lib/amd64/libstdc++.so
>         libm.so.2 =>     /lib/64/libm.so.2
>         libc.so.1 =>     /lib/64/libc.so.1
>         libgcc_s.so.1 => /opt/csw/lib/amd64/libgcc_s.so.1
> $ elfdump -d /opt/csw/lib/amd64/libstdc++.so|grep NEEDED
>        [1]  NEEDED            0x26bb7             libm.so.2
>        [2]  NEEDED            0x26bca             libc.so.1
>        [4]  NEEDED            0x26c1f             libgcc_s.so.1
>



$ ldd /opt/XXXX/lib/amd64/libstdc++.so
         libm.so.2 =>     /lib/64/libm.so.2
         libc.so.1 =>     /lib/64/libc.so.1
         libgcc_s.so.1 =>         (file not found)

It is there and is found when running.


$ elfdump -d /opt/XXXX/lib/amd64/libstdc++.so|grep NEEDED
        [1]  NEEDED            0x26bb7             libm.so.2
        [2]  NEEDED            0x26bca             libc.so.1
        [4]  NEEDED            0x26c13             libgcc_s.so.1



> So libc.so.1 comes before libgcc_s.so.1 
$ truss ./a.out 2>&1 | egrep 'open.*(libc|libgcc)'
open("/opt/XXXX/lib/64/libgcc_s.so.1", O_RDONLY) = 3
open("/lib/64/libc.so.1", O_RDONLY)             = 3

I'm opening libc second.




James.


More information about the users mailing list