ELF: clarify error when we don't know the output format

lld differs from GNU ld in that it does not have a built-in default
target emulation. Emulation is always specified via the -m option, or
obtained from the object file(s) being linked. In most cases at least
one ELF object is included in the link, so the emulation is known.

When using lld's (not yet committed) -b binary support with -r, to
convert a binary file into an ELF object we do not have a known
emulation. The error message previously emitted in this case
"-m or at least a .o file required" is accurate but does not offer
much insight. Add text to the error message to give a hint why -m or an
object file is required.

Differential Revision:	https://reviews.llvm.org/D24348

llvm-svn: 280989
This commit is contained in:
Ed Maste
2016-09-08 21:06:29 +00:00
parent 0fbd53434d
commit e349b6da2c
2 changed files with 2 additions and 2 deletions

View File

@@ -313,7 +313,7 @@ void LinkerDriver::main(ArrayRef<const char *> ArgsArr) {
link<ELF64BE>(Args);
return;
default:
error("-m or at least a .o file required");
error("target emulation unknown: -m or at least one .o file required");
}
}