MaskRay added a comment.

In D138221#3941173 <https://reviews.llvm.org/D138221#3941173>, @yaxunl wrote:

> In D138221#3939384 <https://reviews.llvm.org/D138221#3939384>, @MaskRay wrote:
>
>>> Some host relocatable objects may not contain device relocatable objects, 
>>> where an empty file is passed to lld, which causes lld to fail.
>>
>> How is an empty file (size=0) passed to lld? If a dummy relocatable object 
>> file is parsed to lld, lld can infer the machine type from `e_machine` in 
>> the ELF header.
>> How does it work in other cases? Because a non-empty relocatable object file 
>> is used?
>>
>> I do not object to a new emulation which does not exist in GNU ld, but the 
>> description needs to be clarified.
>
> Updated description. The empty file is generated by clang-offload-bundler, 
> which does not know how to create a dummy relocatable object file for a 
> device target.

A size=0 file is handled like a linker script, not a relocatable object file. 
The linker script will be ignored.


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

https://reviews.llvm.org/D138221

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to