1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[AMDGPU] Don’t marke 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.

Differential Revision: https://reviews.llvm.org/D74600
This commit is contained in:
Sebastian Neubauer 2020-02-13 09:43:08 +01:00
parent 8741b93e56
commit 8b6d8bc210
2 changed files with 2 additions and 3 deletions

View File

@ -440,7 +440,7 @@ void AMDGPUTargetELFStreamer::EmitNote(
S.PushSection();
S.SwitchSection(Context.getELFSection(
ElfNote::SectionName, ELF::SHT_NOTE, ELF::SHF_ALLOC));
ElfNote::SectionName, ELF::SHT_NOTE, 0));
S.emitIntValue(NameSZ, 4); // namesz
S.emitValue(DescSZ, 4); // descz
S.emitIntValue(NoteType, 4); // type

View File

@ -19,8 +19,7 @@
; ELF: }
; ELF: SHT_NOTE
; ELF: Flags [ (0x2)
; ELF: SHF_ALLOC (0x2)
; ELF: Flags [ (0x0)
; ELF: ]
; ELF: SectionData (
; ELF: 0000: 04000000 08000000 01000000 414D4400