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
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
; ELF: }
; ELF: SHT_NOTE
-; ELF: Flags [ (0x2)
-; ELF: SHF_ALLOC (0x2)
+; ELF: Flags [ (0x0)
; ELF: ]
; ELF: SectionData (
; ELF: 0000: 04000000 08000000 01000000 414D4400