[PATCH] D12447: LLD: ELF/AMDGPU: Text section should be called .hsatext

Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 14:44:14 PDT 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL248621: ELF/AMDGPU: Text section should be called .hsatext (authored by tstellar).

Changed prior to commit:
  http://reviews.llvm.org/D12447?vs=33466&id=35768#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D12447

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

Index: lld/trunk/test/elf/AMDGPU/hsa.test
===================================================================
--- lld/trunk/test/elf/AMDGPU/hsa.test
+++ lld/trunk/test/elf/AMDGPU/hsa.test
@@ -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 @@
   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 @@
   Local:
     - Name:            kernel
       Type:            STT_GNU_IFUNC
-      Section:         .text
+      Section:         .hsatext
 ...
Index: lld/trunk/lib/ReaderWriter/ELF/AMDGPU/AMDGPUTargetHandler.h
===================================================================
--- lld/trunk/lib/ReaderWriter/ELF/AMDGPU/AMDGPUTargetHandler.h
+++ lld/trunk/lib/ReaderWriter/ELF/AMDGPU/AMDGPUTargetHandler.h
@@ -36,7 +36,7 @@
   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")
Index: lld/trunk/lib/ReaderWriter/ELF/AMDGPU/AMDGPUTargetHandler.cpp
===================================================================
--- lld/trunk/lib/ReaderWriter/ELF/AMDGPU/AMDGPUTargetHandler.cpp
+++ lld/trunk/lib/ReaderWriter/ELF/AMDGPU/AMDGPUTargetHandler.cpp
@@ -34,7 +34,7 @@
 }
 
 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 @@
   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>(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12447.35768.patch
Type: text/x-patch
Size: 2401 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150925/ba950b09/attachment.bin>


More information about the llvm-commits mailing list