[PATCH] D55311: Add support for OUTPUT_ARCH linker script command

Bill Wendling via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 5 15:20:08 PST 2018


void added a comment.

In D55311#1320721 <https://reviews.llvm.org/D55311#1320721>, @ruiu wrote:

> Looks like what you are trying to do is to generate a x86-64 executable from i386 object files. That's what we do not expect in lld. With this patch, in theory you can create AArch64 exectuables from x86-64 object files, but that doesn't make sense and likely to crash the linker because we assume that all object files are uniform in terms of target types.
>
> I think this use case is too tricky to directly support in the linker. I'd probably use objcopy or something to transplant i386 code to x86-64 object file before passing it to the linker, so that we don't deal with the trickiness in the linker.


Sorry, I've never said that I want to generate an x86-64 executable from i386 object files. The `OUTPUT_ARCH` command doesn't do that anyway...


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55311/new/

https://reviews.llvm.org/D55311





More information about the llvm-commits mailing list