R600: Use SHT_PROGBITS for the .AMDGPU.config section
authorTom Stellard <thomas.stellard@amd.com>
Wed, 24 Apr 2013 23:56:14 +0000 (23:56 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Wed, 24 Apr 2013 23:56:14 +0000 (23:56 +0000)
The libelf implementation that is distributed here:
http://www.mr511.de/software/english.html
will not parse sections that are marked SHT_NULL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180230 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/R600/AMDGPUAsmPrinter.cpp
test/CodeGen/R600/elf.ll

index dc0461a641b6f847e1da4a5e428df951b370a1a3..7dabbfa2295777e66ecb07a34bd70434702c6638 100644 (file)
@@ -59,7 +59,7 @@ bool AMDGPUAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
 
   const MCSectionELF *ConfigSection = getObjFileLowering().getContext()
                                               .getELFSection(".AMDGPU.config",
-                                              ELF::SHT_NULL, 0,
+                                              ELF::SHT_PROGBITS, 0,
                                               SectionKind::getReadOnly());
   OutStreamer.SwitchSection(ConfigSection);
   if (STM.device()->getGeneration() > AMDGPUDeviceInfo::HD6XXX) {
index 555ee3d5c3d97b643a85c9a4fde78f7cd0509897..dbe3b1f4176027a34bda5ed58fa8343b0cc6b8f9 100644 (file)
@@ -3,6 +3,7 @@
 
 ; ELF-CHECK: Format: ELF32
 ; ELF-CHECK: Name: .AMDGPU.config
+; ELF-CHECK: Type: SHT_PROGBITS
 
 ; CONFIG-CHECK: .section .AMDGPU.config
 ; CONFIG-CHECK-NEXT: .long   45096