[AMDGPU] Don't mark the .note section as ALLOC
authorSebastian Neubauer <sebastian.neubauer@amd.com>
Tue, 17 Mar 2020 12:14:24 +0000 (13:14 +0100)
committerSebastian Neubauer <sebastian.neubauer@amd.com>
Tue, 5 May 2020 12:21:45 +0000 (14:21 +0200)
commit1de4e5693317c1e34cae4740d6c9c6733e5ed3fd
tree0b57466a32c05a554ed3a5ee242d661a84a0d9e7
parent8cb5663abd117f93b1e44c014f527ad44462d8b8
[AMDGPU] Don't mark the .note section as ALLOC

Marking a section as ALLOC tells the ELF loader to load the section into memory.
As we do not want to load the notes into VRAM, the flag should not be there.

On AMDHSA, .note is still marked as ALLOC, apparently this is currently
needed for OpenCL (see https://reviews.llvm.org/D74995).

Differential Revision: https://reviews.llvm.org/D76278
llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.h
llvm/test/CodeGen/AMDGPU/amdpal-elf.ll [new file with mode: 0644]