[PATCH] D28898: [ELF] - Allow emulation to be different from input objects target.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 23 07:10:38 PST 2017
>> + // Take machine type from emulation first. That is done early so
>> + // we are able to report wrong emulation values if any.
>> + if (!Config->Emulation.empty()) {
>> + std::tie(Config->EKind, Config->EMachine, Config->OSABI) =
>> + parseEmulation(Config->Emulation);
>> + Config->MipsN32Abi = Config->Emulation == "elf32btsmipn32" ||
>> + Config->Emulation == "elf32ltsmipn32";
>> + }
>
>What breaks without this? I am probably OK with completely ignoring -m
>if a .o is present (which I assume is what gold does), but it feels odd
>to use only some bits of it.
>
>Cheers,
>Rafael
It breaks mips-n32-emul.s.
I am using some bits in this case because honestly I just do not know can we ignore it or not and
why that was implemented. Mips is special itself and we even have Config->MipsN32Abi, so
desided it is ok to remove later if we will want. May be Simon as able to clarify if we need that ?
> BTW, have you tried asking the original author why the mismatched -m and
> .o?
It is problematic. It was D13055.
I think motivation was that patch worked like bfd in non-script case.
George.
More information about the llvm-commits
mailing list