[PATCH] D75913: [AMDGPU] Use progbits type for .AMDGPU.disasm section

Sebastian Neubauer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 10 05:48:50 PDT 2020


Flakebi created this revision.
Flakebi added reviewers: nhaehnle, msearles, kzhuravl.
Herald added subscribers: llvm-commits, kerbowa, hiraditya, t-tye, Anastasia, tpr, dstuttard, yaxunl, wdng, jvesely, arsenm.
Herald added a project: LLVM.

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.

Konstantin, Mark: Is this going to work on the OpenCL side?


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75913

Files:
  llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp


Index: llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
@@ -541,7 +541,7 @@
   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";


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75913.249331.patch
Type: text/x-patch
Size: 534 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200310/a3ab8d49/attachment.bin>


More information about the llvm-commits mailing list