[PATCH] D21779: [LTO] Infer EKind/EMachine from Bitcode files

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 6 10:24:45 PDT 2016


On Tue, Jul 5, 2016 at 6:33 AM, Daniel Sanders <daniel.sanders at imgtec.com>
wrote:

> dsanders added a subscriber: dsanders.
>
> ================
> Comment at: lld/trunk/ELF/InputFiles.cpp:559-562
> @@ +558,6 @@
> +  Triple TheTriple(TripleStr);
> +  bool Is64Bits = TheTriple.isArch64Bit();
> +  if (TheTriple.isLittleEndian())
> +    return Is64Bits ? ELF64LEKind : ELF32LEKind;
> +  return Is64Bits ? ELF64BEKind : ELF32BEKind;
> +}
> ----------------
> 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).


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160706/9aab1803/attachment.html>


More information about the llvm-commits mailing list