[lld] r248621 - ELF/AMDGPU: Text section should be called .hsatext

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 14:42:30 PDT 2015


Author: tstellar
Date: Fri Sep 25 16:42:30 2015
New Revision: 248621

URL: http://llvm.org/viewvc/llvm-project?rev=248621&view=rev
Log:
ELF/AMDGPU: Text section should be called .hsatext

Reviewers: atanasyan, ruiu

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12447

Modified:
    lld/trunk/lib/ReaderWriter/ELF/AMDGPU/AMDGPUTargetHandler.cpp
    lld/trunk/lib/ReaderWriter/ELF/AMDGPU/AMDGPUTargetHandler.h
    lld/trunk/test/elf/AMDGPU/hsa.test

Modified: lld/trunk/lib/ReaderWriter/ELF/AMDGPU/AMDGPUTargetHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/AMDGPU/AMDGPUTargetHandler.cpp?rev=248621&r1=248620&r2=248621&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/AMDGPU/AMDGPUTargetHandler.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/AMDGPU/AMDGPUTargetHandler.cpp Fri Sep 25 16:42:30 2015
@@ -34,7 +34,7 @@ std::unique_ptr<Writer> AMDGPUTargetHand
 }
 
 HSATextSection::HSATextSection(const ELFLinkingContext &ctx)
-    : AtomSection(ctx, ".text", DefinedAtom::typeCode, 0, 0) {
+    : AtomSection(ctx, ".hsatext", DefinedAtom::typeCode, 0, 0) {
   _type = SHT_PROGBITS;
   _flags = SHF_ALLOC | SHF_WRITE | SHF_EXECINSTR | SHF_AMDGPU_HSA_AGENT |
            SHF_AMDGPU_HSA_CODE;
@@ -49,7 +49,7 @@ void AMDGPUTargetLayout::assignSectionsT
   for (OutputSection<ELF64LE> *osi : _outputSections) {
     for (Section<ELF64LE> *section : osi->sections()) {
       StringRef InputSectionName = section->inputSectionName();
-      if (InputSectionName != ".text")
+      if (InputSectionName != ".hsatext")
         continue;
 
       Segment<ELF64LE> *segment = new (_allocator) Segment<ELF64LE>(

Modified: lld/trunk/lib/ReaderWriter/ELF/AMDGPU/AMDGPUTargetHandler.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/AMDGPU/AMDGPUTargetHandler.h?rev=248621&r1=248620&r2=248621&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/AMDGPU/AMDGPUTargetHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/AMDGPU/AMDGPUTargetHandler.h Fri Sep 25 16:42:30 2015
@@ -36,7 +36,7 @@ public:
   createSection(StringRef name, int32_t contentType,
                 DefinedAtom::ContentPermissions contentPermissions,
                 TargetLayout::SectionOrder sectionOrder) override {
-    if (name == ".text")
+    if (name == ".hsatext")
       return new (_allocator) HSATextSection(_ctx);
 
     if (name == ".note")

Modified: lld/trunk/test/elf/AMDGPU/hsa.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/AMDGPU/hsa.test?rev=248621&r1=248620&r2=248621&view=diff
==============================================================================
--- lld/trunk/test/elf/AMDGPU/hsa.test (original)
+++ lld/trunk/test/elf/AMDGPU/hsa.test Fri Sep 25 16:42:30 2015
@@ -10,7 +10,7 @@
 
 
 # CHECK: Section {
-# CHECK: Name: .text
+# CHECK: Name: .hsatext
 # CHECK: Type: SHT_PROGBITS (0x1)
 # CHECK: Flags [ (0xC00007
 # CHECK: SHF_ALLOC (0x2)
@@ -36,7 +36,7 @@ FileHeader:
   Type:            ET_REL
   Machine:         EM_AMDGPU
 Sections:
-  - Name:            .text
+  - Name:            .hsatext
     Type:            SHT_PROGBITS
     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
     AddressAlign:    0x0000000000000004
@@ -49,5 +49,5 @@ Symbols:
   Local:
     - Name:            kernel
       Type:            STT_GNU_IFUNC
-      Section:         .text
+      Section:         .hsatext
 ...




More information about the llvm-commits mailing list