This reverts commit
977cd661cf019039dec7ffdd15bf0ac500828c87.
It breaks OpenCL testing. OpenCL Runtime is using PT_LOAD information
to calculate memory for global variables. This commit should be relanded once
the OpenCL runtime stops relying on PT_LOAD information for calculating global
variable memory size.
Differential Revision: https://reviews.llvm.org/D74995
S.PushSection();
S.SwitchSection(Context.getELFSection(
- ElfNote::SectionName, ELF::SHT_NOTE, 0));
+ ElfNote::SectionName, ELF::SHT_NOTE, ELF::SHF_ALLOC));
S.emitIntValue(NameSZ, 4); // namesz
S.emitValue(DescSZ, 4); // descz
S.emitIntValue(NoteType, 4); // type
; ELF: }
; ELF: SHT_NOTE
-; ELF: Flags [ (0x0)
+; ELF: Flags [ (0x2)
+; ELF: SHF_ALLOC (0x2)
; ELF: ]
; ELF: SectionData (
; ELF: 0000: 04000000 08000000 01000000 414D4400