Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

libcxaguard

anuj_goyal
Beginner
443 Views
I am experimenting with the Intel compiler

$ ldd myexec
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00202000)
libm.so.6 => /lib/tls/libm.so.6 (0x002ed000)
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x0074a000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00e14000)
libcxaguard.so.5 => not found
libc.so.6 => /lib/tls/libc.so.6 (0x009c0000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00685000)


what is libcxaguard being used for? how can I get this paritcular shared object statically linked into myexec? or is this library allowed to be redistributed with myexec?

[/opt/intel_cc_80/lib]$ nm libcxaguard.so.5
U abort
00001694 A __bss_start
0000059e T __cxa_guard_abort
0000054c T __cxa_guard_acquire
000004d0 t _cxa_guard_get_lock
000015ac d cxa_guard_mutex
0000058c T __cxa_guard_release
0000050e t _cxa_guard_release_lock
000015c4 A _DYNAMIC
00001694 A _edata
00001694 A _end
00001674 A _GLOBAL_OFFSET_TABLE_
00000000 A ICRT.INTERNAL
w pthread_mutex_lock
w pthread_mutex_unlock
0 Kudos
2 Replies
TimP
Honored Contributor III
443 Views
Linking with options such as
icc -static-libcxa
or
icc -i-static

should set up static link of libcxaguard. The effect of those options varies among the compilers for the 3 architectures.

If you have a license which permits distribution of your exec, the dynamic libraries which it requires may be distributed with it.
0 Kudos
Maximillia_D_Intel
443 Views
Hi,
To add to Tim's comment, the file /opt/intel_cc_80/licenses/credist.txt contains the list of files that may be redistributed.
Max
0 Kudos
Reply