[Openmp-commits] [PATCH] D64943: [Clang][OpenMP offload] Eliminate use of OpenMP linker script

Sergey Dmitriev via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Sep 12 11:00:41 PDT 2019


sdmitriev added a comment.

In D64943#1668006 <https://reviews.llvm.org/D64943#1668006>, @JonChesterfield wrote:

> >> Does this diff mix getting rid of the linker script with other changes? E.g. it looks like the metadata generation is moving from clang to the new tool, but that seems orthogonal to dropping the linker script.
> > 
> > Metadata is still generated by the clang, there are no changes in this area. What is moving to a wrapper tool is the generation of the offload registration code. Let me just attach the slides that I presented on the inter company meeting were the proposal was discussed. It'll probably answer most of your questions. F9983224: openmp_linker_script.pdf <https://reviews.llvm.org/F9983224>
>
> It does indeed, thanks. I see the motivation for delaying offload registration code. I'm pretty sure that is indeed orthogonal to removing the linker script.
>
> How would you feel about using objcopy to embed the device binary?


I see some problems with using llvm-objcopy for that. First issue is that symbols created by llvm-objcopy for embedded data depend on the input file name. As you know these symbols are referenced from the offload registration code that is currently added to an object by the clang at compile time. I not sure how you can guarantee that symbol names will match. And another, more important problem is that it won't work on Windows because llvm-objcopy produces ELF object according to the description.

Anyway I am going to change entries section name to "omp_offloading_entries", remove omptargetbegin.o/omptargetend.o and upload the revised patch.


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

https://reviews.llvm.org/D64943





More information about the Openmp-commits mailing list