[OpenMP] Ensure offloading sections do not have SHF_ALLOC flag
authorJoseph Huber <jhuber6@vols.utk.edu>
Mon, 21 Feb 2022 17:40:16 +0000 (12:40 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Tue, 22 Feb 2022 02:35:17 +0000 (21:35 -0500)
commit456ffd7a225f908ca61d747be21439f6182ea40c
tree069e71baa42e68ff5aa912a7f3bad9538c48cc7a
parent294072e10b9949323bf20695085723158f7c873c
[OpenMP] Ensure offloading sections do not have SHF_ALLOC flag

We use offloading sections in the new Clang driver scheme to embed
device code into the host. We later use these sections to link the
device image, after which point they are completely unused and should
not be loaded into memory if they are still in the executable.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D120275
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/test/CodeGen/X86/offload_sections.ll [new file with mode: 0644]