Reputation: 351
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.)
Upvotes: 4
Views: 7744
Reputation: 313
ELF symbols are symbolic references to some type of data or code such as a global variable or function. "nm" (name mangling [1]) allows us to print out all of the symbols in an ELF file. In its default invocation "nm"s output includes three columns and for each symbol it shows following information with the same order given below:
Example output of the utility "nm":
$ nm 'example_program'
000005d4 t print_error_message
-------- U strlen@@GLIBC_2.4
-------- U syscall@@GLIBC_2.4
00011008 b device_list
000005f9 t send_message_to_device
000006e5 T main
...
For more information you can refer to man page of nm [2]
Upvotes: 0
Reputation: 126338
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.
Upvotes: 7