[PATCH] D25694: [AMDGPU] Mark .note section SHF_ALLOC so lld creates a segment for it
Konstantin Zhuravlyov via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 17 15:49:40 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL284435: [AMDGPU] Mark .note section SHF_ALLOC so lld creates a segment for it (authored by kzhuravl).
Changed prior to commit:
https://reviews.llvm.org/D25694?vs=74887&id=74927#toc
Repository:
rL LLVM
https://reviews.llvm.org/D25694
Files:
llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
llvm/trunk/test/CodeGen/AMDGPU/hsa.ll
Index: llvm/trunk/test/CodeGen/AMDGPU/hsa.ll
===================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/hsa.ll
+++ llvm/trunk/test/CodeGen/AMDGPU/hsa.ll
@@ -17,11 +17,16 @@
; ELF: }
; ELF: SHT_NOTE
+; ELF: Flags [ (0x2)
+; ELF: SHF_ALLOC (0x2)
+; ELF: ]
+; ELF: SectionData (
; ELF: 0000: 04000000 08000000 01000000 414D4400
; ELF: 0010: 02000000 01000000 04000000 1B000000
; ELF: 0020: 03000000 414D4400 04000700 07000000
; ELF: 0030: 00000000 00000000 414D4400 414D4447
; ELF: 0040: 50550000
+; ELF: )
; ELF: Symbol {
; ELF: Name: simple
Index: llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
+++ llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
@@ -97,7 +97,8 @@
AMDGPUTargetELFStreamer::EmitDirectiveHSACodeObjectVersion(uint32_t Major,
uint32_t Minor) {
MCStreamer &OS = getStreamer();
- MCSectionELF *Note = OS.getContext().getELFSection(".note", ELF::SHT_NOTE, 0);
+ MCSectionELF *Note =
+ OS.getContext().getELFSection(".note", ELF::SHT_NOTE, ELF::SHF_ALLOC);
unsigned NameSZ = 4;
@@ -120,7 +121,8 @@
StringRef VendorName,
StringRef ArchName) {
MCStreamer &OS = getStreamer();
- MCSectionELF *Note = OS.getContext().getELFSection(".note", ELF::SHT_NOTE, 0);
+ MCSectionELF *Note =
+ OS.getContext().getELFSection(".note", ELF::SHT_NOTE, ELF::SHF_ALLOC);
unsigned NameSZ = 4;
uint16_t VendorNameSize = VendorName.size() + 1;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25694.74927.patch
Type: text/x-patch
Size: 1773 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161017/ee0ec2a8/attachment.bin>
More information about the llvm-commits
mailing list