Hi,all.
When i link to generate executable file after compiled the whole project in 32bits mode, the linker tell me there is a symbol at one object file can not be found! I work at the mac OSX 10.12 and use the intel compiler of version 2018.
The symbol is '___cvtu64todp_sse2'. I am sure I not define or use the symbol in my whole project. I use the objdump tool to get more info of the object file.
First, I open the symbol table. I find the strange symbol and it is tagged "UNDEFINED".
......
00000000 *UND* _g_thread_functions_for_glib_use
00000000 *UND* ___gxx_personality_v0
00000000 *UND* _g_threads_got_initialized
00000000 *UND* ___cxa_call_unexpected
00000000 *UND* __Unwind_Resume
00000000 *UND* ___cvtu64todp_sse2
00000000 *UND* __Z11GetLogLevelv
00000000 *UND* __Z17printf_log_helper13AudioLogLevelPKcz
00000000 *UND* _printf
Then I open the relocation table, There are a lot of entry of this symbol. A segment of the relocation table:
...
00000391 GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
000003b0 GENERIC_RELOC_LOCAL_SECTDIFF 0x40f8-0x2ff
000003d9 GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
000003ea GENERIC_RELOC_LOCAL_SECTDIFF 0x4100-0x2ff
00000403 GENERIC_RELOC_LOCAL_SECTDIFF 0x4150-0x2ff
000004ce GENERIC_RELOC_LOCAL_SECTDIFF 0x4098-0x2ff
0000063c GENERIC_RELOC_LOCAL_SECTDIFF 0x40f8-0x2ff
00000657 GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
000006a5 GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
00000790 GENERIC_RELOC_LOCAL_SECTDIFF __const-0x2ff
00000797 GENERIC_RELOC_LOCAL_SECTDIFF 0x4140-0x2ff
00000810 GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
00000838 GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
0000096c GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
000009df GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
00000a42 GENERIC_RELOC_LOCAL_SECTDIFF 0x40f8-0x2ff
00000b25 GENERIC_RELOC_LOCAL_SECTDIFF __const-0x2ff
00000b63 GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
00000b86 GENERIC_RELOC_LOCAL_SECTDIFF 0x4140-0x2ff
00000b9a GENERIC_RELOC_LOCAL_SECTDIFF 0x4118-0x2ff
00000bf5 GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
00000c1d GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
00000cae GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
00000cd6 GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
00000d67 GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
00000d8f GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
00000e20 GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
00000e48 GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
00000f36 GENERIC_RELOC_LOCAL_SECTDIFF __const-0x2ff
00000f67 GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
00000f92 GENERIC_RELOC_LOCAL_SECTDIFF 0x4140-0x2ff
00000fa6 GENERIC_RELOC_LOCAL_SECTDIFF 0x4118-0x2ff
0000100e GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
00001036 GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
00001113 GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
00001157 GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
0000119c GENERIC_RELOC_LOCAL_SECTDIFF 0x4150-0x2ff
...
Last, I disassembling the object file and display the symbol in the assembly code. I find there are 77 site. Moreover the symbol appear at a almost same code:
......
6a4: e8 57 f9 ff ff calll -1705 <__ZN16ClockrateManagerC1Ev>
000006a5: GENERIC_RELOC_VANILLA ___cvtu64todp_sse2
......
The symbol, '__ZN16ClockrateManagerC1Ev', is a construction function in my source file. But I not call it so many times
So many strange things happened. I want to know the reason. Is it a defect of intel compile of 2018. There more than one strange object file just like this in my project
I can post the command used to compile the file:
"/usr/local/bin/icpc -o clockratemanager.o -c -arch i386 -std=c++11 -stdlib=libc++ -isysroot /Applications/... -mmacosx-version-min=10.7 -arch i386 -I/opt/intel/composerxe/ipp/include -I/opt/intel/composerxe/include -g -O3 -pipe -wd1,161,172,177,181,188,383,593,869,981,1418,1419,1572,1599,2259,3199,18000 -restrict -fasm-blocks -ip -MD -MP -m32, -DENV_DARWIN=1..."
On the other hand, I compile the same source file at the same system and 2017 intel compile. I open the above object file, and find there a no the strange symbol in the symbol table:
......
00000000 *UND* _g_thread_functions_for_glib_use
00000000 *UND* ___gxx_personality_v0
00000000 *UND* _g_threads_got_initialized
00000000 *UND* ___cxa_call_unexpected
00000000 *UND* __Unwind_Resume
00000000 *UND* __Z11GetLogLevelv
00000000 *UND* __Z17printf_log_helper13AudioLogLevelPKcz
00000000 *UND* _printf
You can see that the 2018 compiler just generate one more symbol, the strange one, ___cvtu64todp_sse2.
In the assembly code, every thing seem normal. The construct function is just called 6 times. Build the whole project in 32bits, successfully.
I go back to the 2018 compiler and compile the file and whole project in 64bits, Every thing also is OK.
so any one encounter the same problem? I need help!