<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/75734>75734</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
How does ORCJIT deal with symbols during compilation? What is the difference between C and C++?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Thrrreeee
</td>
</tr>
</table>
<pre>
When I try to compile LLVM IR that was compiled from a C++ file, I find that the first time that ORCJIT looks up TLS variables is during the `J->initialize()` phase. However, for a C file, the same operation is performed during the` J->lookup('main') `step, which follows the initialization phase.
I know that compilers use different methods to compile C and C++ files, because C++ supports overriding but C does not. Therefore, when a compiler deals with symbols from C++, it needs to use mangling methods to ensure that each symbol is unique. So is it maybe caused by this? I cannot understand what the ORCJIT does when it is initialized, especially for symbols.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxUU82OozgQfhpzKTUCkzTJgcN0ZqPJqFcrTUfbZ4OL4G1js64iKPv0KwPJdJ8QmPr-6rMiMheHWInti9h-T9TInQ_VuQshICImtde36r1DByfgcAP20Ph-MBbh9fXvP-H0C7hTDJOi-4GGNvgeFByEfBHyBVpjUcgDnKA1Ti__c4fQmkAMbHpcvv316_DzdAbr_QfBOMD59Q2uKhhVWyQwBHoMxl3mWfGc_XwSxR_GGTbKmv9QyJ2Qe_GcwdApwhR--AmvGCJz60PU81ASEUj1CH7AoNh4F-EHDK0PPepPRBFvJoqqxmEmKXtlnJClkPuogxiHCDp1pumg9db6iWaKh7iFYtUlsu8i-3aCD-enxfgaXCAYCUGbtsWAjqFH7rymz6EfQDn9JVmK3DU2Ks7eD2gcBh-YwF8xBKOjm3pkOID2SOA8p3DuMGDrAy7i0YF6KAGNyhJMhjugW197S8tWV4I4Yhgc4iIvcvfKXWwk-iQbHY1hXS-q5g4W0x6d-XfEFN58fDMMvbrVCLMPDfUNuDMkiiOcoFHOeYbRaQzEMYDp3qG1M7Or2YPhGe5RCx2lIg3YGGXtba7C6iiFRFeF3hd7lWCVl5ncZXlWZElX6VrLQuNmW5SoyqbdFW3-vCsk7rBuCywTU8lMFrnMy2yXl3mWbtRG5VmjGq2LEnMUmwx7ZWxq7bVPfbgkhmjEqtyWxSaxqkZL862T0uEE86GQMl7CUMWZp3q8kNhk1hDTbxQ2bLH64afF890_Kvt1W2uFl4XO_YtZvsfcYkAxu3vRGoQaeUJ0X-slimMyBlt1zAOJ4puQRyGPF8PdWKeN74U8Rlnr42kI_h9sWMjjbIaEPM5m_w8AAP__0dl5nA">