<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jul 5, 2016 at 6:33 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">dsanders added a subscriber: dsanders.<br>
<br>
================<br>
Comment at: lld/trunk/ELF/InputFiles.cpp:559-562<br>
@@ +558,6 @@<br>
+  Triple TheTriple(TripleStr);<br>
<span>+  bool Is64Bits = TheTriple.isArch64Bit();<br>
</span><span>+  if (TheTriple.isLittleEndian())<br>
+    return Is64Bits ? ELF64LEKind : ELF32LEKind;<br>
+  return Is64Bits ? ELF64BEKind : ELF32BEKind;<br>
+}<br>
</span>----------------<br>
Sorry for the late comment but Triple::isArch64Bit() doesn't correspond to ELF64 or ELF32 on MIPS. In particular, the triple used for the N32 ABI will return true for isArch64Bit() but this ABI uses ELF32 objects. If lld doesn't support the N32 ABI yet then the current code is ok for the remaining two ABI's (O32 and N64).</blockquote><div><br></div><div>Ah, interesting. So N32 is a 32-bit ABI on 64-bit MIPS just like x32 ABI is on x86-64. Do you know how to determine whether it is ELF32 or ELF64 for such triple?</div></div></div></div>