forked from OSchip/llvm-project
ELF/AMDGPU: Text section should be called .hsatext
Reviewers: atanasyan, ruiu Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12447 llvm-svn: 248621
This commit is contained in:
parent
e86bbd8979
commit
d0626804fc
|
@ -34,7 +34,7 @@ std::unique_ptr<Writer> AMDGPUTargetHandler::getWriter() {
|
||||||
}
|
}
|
||||||
|
|
||||||
HSATextSection::HSATextSection(const ELFLinkingContext &ctx)
|
HSATextSection::HSATextSection(const ELFLinkingContext &ctx)
|
||||||
: AtomSection(ctx, ".text", DefinedAtom::typeCode, 0, 0) {
|
: AtomSection(ctx, ".hsatext", DefinedAtom::typeCode, 0, 0) {
|
||||||
_type = SHT_PROGBITS;
|
_type = SHT_PROGBITS;
|
||||||
_flags = SHF_ALLOC | SHF_WRITE | SHF_EXECINSTR | SHF_AMDGPU_HSA_AGENT |
|
_flags = SHF_ALLOC | SHF_WRITE | SHF_EXECINSTR | SHF_AMDGPU_HSA_AGENT |
|
||||||
SHF_AMDGPU_HSA_CODE;
|
SHF_AMDGPU_HSA_CODE;
|
||||||
|
@ -49,7 +49,7 @@ void AMDGPUTargetLayout::assignSectionsToSegments() {
|
||||||
for (OutputSection<ELF64LE> *osi : _outputSections) {
|
for (OutputSection<ELF64LE> *osi : _outputSections) {
|
||||||
for (Section<ELF64LE> *section : osi->sections()) {
|
for (Section<ELF64LE> *section : osi->sections()) {
|
||||||
StringRef InputSectionName = section->inputSectionName();
|
StringRef InputSectionName = section->inputSectionName();
|
||||||
if (InputSectionName != ".text")
|
if (InputSectionName != ".hsatext")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Segment<ELF64LE> *segment = new (_allocator) Segment<ELF64LE>(
|
Segment<ELF64LE> *segment = new (_allocator) Segment<ELF64LE>(
|
||||||
|
|
|
@ -36,7 +36,7 @@ public:
|
||||||
createSection(StringRef name, int32_t contentType,
|
createSection(StringRef name, int32_t contentType,
|
||||||
DefinedAtom::ContentPermissions contentPermissions,
|
DefinedAtom::ContentPermissions contentPermissions,
|
||||||
TargetLayout::SectionOrder sectionOrder) override {
|
TargetLayout::SectionOrder sectionOrder) override {
|
||||||
if (name == ".text")
|
if (name == ".hsatext")
|
||||||
return new (_allocator) HSATextSection(_ctx);
|
return new (_allocator) HSATextSection(_ctx);
|
||||||
|
|
||||||
if (name == ".note")
|
if (name == ".note")
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
|
|
||||||
# CHECK: Section {
|
# CHECK: Section {
|
||||||
# CHECK: Name: .text
|
# CHECK: Name: .hsatext
|
||||||
# CHECK: Type: SHT_PROGBITS (0x1)
|
# CHECK: Type: SHT_PROGBITS (0x1)
|
||||||
# CHECK: Flags [ (0xC00007
|
# CHECK: Flags [ (0xC00007
|
||||||
# CHECK: SHF_ALLOC (0x2)
|
# CHECK: SHF_ALLOC (0x2)
|
||||||
|
@ -36,7 +36,7 @@ FileHeader:
|
||||||
Type: ET_REL
|
Type: ET_REL
|
||||||
Machine: EM_AMDGPU
|
Machine: EM_AMDGPU
|
||||||
Sections:
|
Sections:
|
||||||
- Name: .text
|
- Name: .hsatext
|
||||||
Type: SHT_PROGBITS
|
Type: SHT_PROGBITS
|
||||||
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
||||||
AddressAlign: 0x0000000000000004
|
AddressAlign: 0x0000000000000004
|
||||||
|
@ -49,5 +49,5 @@ Symbols:
|
||||||
Local:
|
Local:
|
||||||
- Name: kernel
|
- Name: kernel
|
||||||
Type: STT_GNU_IFUNC
|
Type: STT_GNU_IFUNC
|
||||||
Section: .text
|
Section: .hsatext
|
||||||
...
|
...
|
||||||
|
|
Loading…
Reference in New Issue