This is in preparation for linking with LLVM's lld, which does not have a compiled-in default output emulation. lld requires that it is specified via the -m option, or obtained from the object file(s) being linked.
We also need to have lld accept elf_amd64_fbsd as an alias for elf_x86_64_fbsd, like so:
diff --git a/ELF/Driver.cpp b/ELF/Driver.cpp index d0d6c2c..0548816 100644 --- a/ELF/Driver.cpp +++ b/ELF/Driver.cpp @@ -71,6 +71,7 @@ static std::pair<ELFKind, uint16_t> parseEmulation(StringRef Emul) { .Case("elf64btsmip", {ELF64BEKind, EM_MIPS}) .Case("elf64ltsmip", {ELF64LEKind, EM_MIPS}) .Case("elf64ppc", {ELF64BEKind, EM_PPC64}) + .Case("elf_amd64", {ELF64LEKind, EM_X86_64}) .Case("elf_i386", {ELF32LEKind, EM_386}) .Case("elf_iamcu", {ELF32LEKind, EM_IAMCU}) .Case("elf_x86_64", {ELF64LEKind, EM_X86_64})