<div dir="ltr">I just submitted r221919 which should fix the breakage on the big-endian machine. I'm sorry to leave the buildbots broken overnight.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 13, 2014 at 6:01 AM, Daniel Sanders <span dir="ltr"><<a href="mailto:Daniel.Sanders@imgtec.com" target="_blank">Daniel.Sanders@imgtec.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Rui,<br>
<br>
I expect you've already had emails from buildbot about this but imports.tests fails on the big-endian hosts. See <a href="http://lab.llvm.org:8011/builders/llvm-mips-linux/builds/11120" target="_blank">http://lab.llvm.org:8011/builders/llvm-mips-linux/builds/11120</a>, and <a href="http://lab.llvm.org:8011/builders/llvm-ppc64-linux1/builds/15854" target="_blank">http://lab.llvm.org:8011/builders/llvm-ppc64-linux1/builds/15854</a> for the logs.<br>
<span class=""><br>
> --- llvm/trunk/lib/Object/COFFObjectFile.cpp (original)<br>
> +++ llvm/trunk/lib/Object/COFFObjectFile.cpp Wed Nov 12 21:22:54 2014<br>
> @@ -1258,6 +1258,20 @@ getDelayImportTable(const delay_import_d<br>
> return object_error::success;<br>
> }<br>
><br>
> +std::error_code DelayImportDirectoryEntryRef::<br>
> +getImportAddress(int AddrIndex, uint64_t &Result) const {<br>
> + uint32_t RVA = Table[Index].DelayImportAddressTable +<br>
> + AddrIndex * (OwningObject->is64() ? 8 : 4);<br>
> + uintptr_t IntPtr = 0;<br>
> + if (std::error_code EC = OwningObject->getRvaPtr(RVA, IntPtr))<br>
> + return EC;<br>
> + if (OwningObject->is64())<br>
> + Result = *reinterpret_cast<const uint64_t *>(IntPtr);<br>
> + else<br>
> + Result = *reinterpret_cast<const uint32_t *>(IntPtr);<br>
> + return object_error::success;<br>
> +}<br>
<br>
</span>I've looked through your patch and I believe the problem is the two reinterpret_casts. They are reading host-endian values but you need to read target-endian values.<br>
</blockquote></div><br></div>