<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; "><div>Thank you for the help.</div><div><br></div><div>The relocation type value is anded with <span class="Apple-style-span" style="color: rgb(44, 46, 207); font-family: Menlo; font-size: 11px; ">0xffffffffL</span>. (RuntimeDyldMachO.cpp:214)</div><div>Maybe this mask should be different?</div><div>Anyway, it seems like this relocation isn't implemented. (RuntimeDyldMachO.cpp:104)</div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Jiong Wang <<a href="mailto:jiwang@tilera.com">jiwang@tilera.com</a>><br><span style="font-weight:bold">Date: </span> Tue, 9 Apr 2013 09:42:03 -0400<br><span style="font-weight:bold">To: </span> Eran Weiss <<a href="mailto:eran.weiss@emc.com">eran.weiss@emc.com</a>><br><span style="font-weight:bold">Cc: </span> "<a href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>" <<a href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>><br><span style="font-weight:bold">Subject: </span> Re: [LLVMdev] Migration from JIT to MCJIT<br></div><div><br></div><div><meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">于 2013/4/9 21:08, Weiss, Eran ε†™ι“:<br>
    </div>
    <blockquote cite="mid:CD89ED6C.5162%25eran.weiss@emc.com" type="cite">
      
      <div>Hi,</div>
      <div><br>
      </div>
      <div>I'm migrating my code (running on mac) from using JIT to
        MCJIT. My code generates in memory, mostly using the llvm-c api,
        and then runs the generated code.</div>
      <div>When I try to use MCJIT I encounter a problem with
        relocations of external symbols – functions compiled statically
        beforehand with gcc.</div>
      <div><br>
      </div>
      <div>I get the following error:</div>
      <div><br>
      </div>
      <div>
        <div>Invalid relocation type!</div>
        <div>UNREACHABLE executed at
/Users/weisse4/dev/llvm/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp:89</div>
      </div>
      <div><br>
      </div>
      <div>While debugging, I see that the relocation type read in  is 218103811, which
        seems corrupt to me.</div>
    </blockquote>
    <br>
    Hi Weiss,<br>
    <br>
        I do not have any experience on Mach binary format, but the hex
    value of 218103811 is 0xd000003  (maybe the relocation type is
    RIT_Generic_PreboundLazyPointer = 3),  something looks like a
    relocation entry composed of "symbol index" + "relocation type".<br>
        maybe something is wrong, that the relocation entry is not anded
    with a mask to get the final relocation type.<br>
    <br>
    ---<br>
    Regards,<br>
    Jiong<br>
    <br>
    <blockquote cite="mid:CD89ED6C.5162%25eran.weiss@emc.com" type="cite">
      <div>Did someone encounter a similar error? Or can direct me to
        changes that I need to do while migrating from JIT to MCJIT?</div>
      <div><br>
      </div>
      <div>Thanks.</div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a></pre>
    </blockquote>
    <br>
  </div></div></span></body></html>