How to read nm commands : What does nm options -T and -U (undefined) mean?

c++, gcc, hpc, linker, nm

Solution

`U` means "undefined" -- the object has a reference to the symbol but no definition

`T` means globally defined in the text segment -- the object defines and exports the symbol

The manual page (`man nm`) lists all these type codes.

Problem

I have linking errors that I suspected from 'libsimint.a'. ``` Linker messages (if any) follow... /home/.../simint/lib/libsimint.a(shell.c.o): In function `simint_copy_shell': shell.c:(.text+0x126): undefined reference to `__intel_ssse3_rep_memcpy' /home/.../simint/lib/libsimint.a(shell.c.o): In function`simint_normalize_shells': shell.c:(.text+0x4e3): undefined reference to `__svml_pow4' ``` I tried nm commands to figure it out: ``` >> nm libsimint.a |grep __intel_ssse3_rep_memcpy U __intel_ssse3_rep_memcpy >> nm libsimint.a |grep simint_copy_shell 0000000000000090 T simint_copy_shell ``` From what I understand by the above (with help of nm man), simint_copy_shell function is mentioned in code but __intel_ssse3_rep_memcpy is not defined in some other libray our libsimint is compiled with. Can anybody verify this or add any clarification? Thanks (I'm compiling and linking a large code using gcc, that was compiled with icpc but instead.)

Original source