[AMDGPU] Use progbits type for .AMDGPU.disasm section
authorSebastian Neubauer <sebastian.neubauer@amd.com>
Tue, 10 Mar 2020 12:14:20 +0000 (13:14 +0100)
committerSebastian Neubauer <sebastian.neubauer@amd.com>
Thu, 12 Mar 2020 08:08:11 +0000 (09:08 +0100)
The note section type implies a specific format that this section does
not have thus tools like readelf fail here. Progbits has no format and
another pipeline compiler already sets the type to progbits.

Differential Revision: https://reviews.llvm.org/D75913

llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp

index c191546..1a56f38 100644 (file)
@@ -541,7 +541,7 @@ bool AMDGPUAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
   if (DumpCodeInstEmitter) {
 
     OutStreamer->SwitchSection(
-        Context.getELFSection(".AMDGPU.disasm", ELF::SHT_NOTE, 0));
+        Context.getELFSection(".AMDGPU.disasm", ELF::SHT_PROGBITS, 0));
 
     for (size_t i = 0; i < DisasmLines.size(); ++i) {
       std::string Comment = "\n";