[PATCH] D28898: [ELF] - Allow emulation to be different from input objects target.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 31 01:54:09 PST 2017
>> + // If we have at least one archive, -m is ignored and we require
>> + // to have at least one ELF input file.
>> + bool HasArchive = llvm::find_if(Files, [](InputFile *F) {
>> + return F->kind() == InputFile::ArchiveKind;
>> + }) != Files.end();
>> + if (HasArchive) {
>> + error("target unknown: at least one ELF file required");
>
>I don't think this is correct. You should wait until the end of symbol
>resolution. Having an archive doesn't guarantee that a member is
>fetched.
>
>Have you found out *why* the kernel build system uses a mismatched -m?
>
I asked next question to Dmitry Goloving who tried booting LLD linked kernel:
(I think he configured it differently and uses few workarounds, that is why kernel links fine for him already)
me:
>> I have a question also. You added -m elf_i386 to workaround emulation conflict issue in LLD, do you know
>> does output produced by BFD boot fine after that change ?
he:
>Doesn't seem to affect BFD at all.
So I think that is like this patch assumes just a mistype or something. Which is accepted both by bfd and gold.
I think we still want to follow that behavior, right ?
>Cheers,
>Rafael
More information about the llvm-commits
mailing list