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 *osi : _outputSections) { for (Section *section : osi->sections()) { StringRef InputSectionName = section->inputSectionName(); - if (InputSectionName != ".text") + if (InputSectionName != ".hsatext") continue; Segment *segment = new (_allocator) Segment( 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 ...