forked from OSchip/llvm-project
AMDGPU: Remove deprecated and unused elf definitions
Differential Revision: https://reviews.llvm.org/D33689 llvm-svn: 304737
This commit is contained in:
parent
4c47434b25
commit
5b0bf2ff0d
|
@ -808,12 +808,7 @@ enum : unsigned {
|
|||
SHF_MIPS_STRING = 0x80000000,
|
||||
|
||||
// Make code section unreadable when in execute-only mode
|
||||
SHF_ARM_PURECODE = 0x20000000,
|
||||
|
||||
SHF_AMDGPU_HSA_GLOBAL = 0x00100000,
|
||||
SHF_AMDGPU_HSA_READONLY = 0x00200000,
|
||||
SHF_AMDGPU_HSA_CODE = 0x00400000,
|
||||
SHF_AMDGPU_HSA_AGENT = 0x00800000
|
||||
SHF_ARM_PURECODE = 0x20000000
|
||||
};
|
||||
|
||||
// Section Group Flags
|
||||
|
@ -897,9 +892,7 @@ enum {
|
|||
STT_HIPROC = 15, // Highest processor-specific symbol type
|
||||
|
||||
// AMDGPU symbol types
|
||||
STT_AMDGPU_HSA_KERNEL = 10,
|
||||
STT_AMDGPU_HSA_INDIRECT_FUNCTION = 11,
|
||||
STT_AMDGPU_HSA_METADATA = 12
|
||||
STT_AMDGPU_HSA_KERNEL = 10
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -1050,12 +1043,6 @@ enum {
|
|||
PT_MIPS_OPTIONS = 0x70000002, // Options segment.
|
||||
PT_MIPS_ABIFLAGS = 0x70000003, // Abiflags segment.
|
||||
|
||||
// AMDGPU program header types.
|
||||
PT_AMDGPU_HSA_LOAD_GLOBAL_PROGRAM = 0x60000000,
|
||||
PT_AMDGPU_HSA_LOAD_GLOBAL_AGENT = 0x60000001,
|
||||
PT_AMDGPU_HSA_LOAD_READONLY_AGENT = 0x60000002,
|
||||
PT_AMDGPU_HSA_LOAD_CODE_AGENT = 0x60000003,
|
||||
|
||||
// WebAssembly program header types.
|
||||
PT_WEBASSEMBLY_FUNCTIONS = PT_LOPROC + 0, // Function definitions.
|
||||
};
|
||||
|
|
|
@ -424,12 +424,6 @@ void ScalarBitSetTraits<ELFYAML::ELF_SHF>::bitset(IO &IO,
|
|||
case ELF::EM_ARM:
|
||||
BCase(SHF_ARM_PURECODE);
|
||||
break;
|
||||
case ELF::EM_AMDGPU:
|
||||
BCase(SHF_AMDGPU_HSA_GLOBAL);
|
||||
BCase(SHF_AMDGPU_HSA_READONLY);
|
||||
BCase(SHF_AMDGPU_HSA_CODE);
|
||||
BCase(SHF_AMDGPU_HSA_AGENT);
|
||||
break;
|
||||
case ELF::EM_HEXAGON:
|
||||
BCase(SHF_HEX_GPREL);
|
||||
break;
|
||||
|
|
|
@ -814,14 +814,8 @@ private:
|
|||
bool ParseDirectiveCodeObjectMetadata();
|
||||
bool ParseAMDKernelCodeTValue(StringRef ID, amd_kernel_code_t &Header);
|
||||
bool ParseDirectiveAMDKernelCodeT();
|
||||
bool ParseSectionDirectiveHSAText();
|
||||
bool subtargetHasRegister(const MCRegisterInfo &MRI, unsigned RegNo) const;
|
||||
bool ParseDirectiveAMDGPUHsaKernel();
|
||||
bool ParseDirectiveAMDGPUHsaModuleGlobal();
|
||||
bool ParseDirectiveAMDGPUHsaProgramGlobal();
|
||||
bool ParseSectionDirectiveHSADataGlobalAgent();
|
||||
bool ParseSectionDirectiveHSADataGlobalProgram();
|
||||
bool ParseSectionDirectiveHSARodataReadonlyAgent();
|
||||
bool AddNextRegisterToList(unsigned& Reg, unsigned& RegWidth,
|
||||
RegisterKind RegKind, unsigned Reg1,
|
||||
unsigned RegNum);
|
||||
|
@ -2365,12 +2359,6 @@ bool AMDGPUAsmParser::ParseDirectiveAMDKernelCodeT() {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool AMDGPUAsmParser::ParseSectionDirectiveHSAText() {
|
||||
getParser().getStreamer().SwitchSection(
|
||||
AMDGPU::getHSATextSection(getContext()));
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AMDGPUAsmParser::ParseDirectiveAMDGPUHsaKernel() {
|
||||
if (getLexer().isNot(AsmToken::Identifier))
|
||||
return TokError("expected symbol name");
|
||||
|
@ -2384,46 +2372,6 @@ bool AMDGPUAsmParser::ParseDirectiveAMDGPUHsaKernel() {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool AMDGPUAsmParser::ParseDirectiveAMDGPUHsaModuleGlobal() {
|
||||
if (getLexer().isNot(AsmToken::Identifier))
|
||||
return TokError("expected symbol name");
|
||||
|
||||
StringRef GlobalName = Parser.getTok().getIdentifier();
|
||||
|
||||
getTargetStreamer().EmitAMDGPUHsaModuleScopeGlobal(GlobalName);
|
||||
Lex();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AMDGPUAsmParser::ParseDirectiveAMDGPUHsaProgramGlobal() {
|
||||
if (getLexer().isNot(AsmToken::Identifier))
|
||||
return TokError("expected symbol name");
|
||||
|
||||
StringRef GlobalName = Parser.getTok().getIdentifier();
|
||||
|
||||
getTargetStreamer().EmitAMDGPUHsaProgramScopeGlobal(GlobalName);
|
||||
Lex();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AMDGPUAsmParser::ParseSectionDirectiveHSADataGlobalAgent() {
|
||||
getParser().getStreamer().SwitchSection(
|
||||
AMDGPU::getHSADataGlobalAgentSection(getContext()));
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AMDGPUAsmParser::ParseSectionDirectiveHSADataGlobalProgram() {
|
||||
getParser().getStreamer().SwitchSection(
|
||||
AMDGPU::getHSADataGlobalProgramSection(getContext()));
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AMDGPUAsmParser::ParseSectionDirectiveHSARodataReadonlyAgent() {
|
||||
getParser().getStreamer().SwitchSection(
|
||||
AMDGPU::getHSARodataReadonlyAgentSection(getContext()));
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AMDGPUAsmParser::ParseDirective(AsmToken DirectiveID) {
|
||||
StringRef IDVal = DirectiveID.getString();
|
||||
|
||||
|
@ -2439,27 +2387,9 @@ bool AMDGPUAsmParser::ParseDirective(AsmToken DirectiveID) {
|
|||
if (IDVal == ".amd_kernel_code_t")
|
||||
return ParseDirectiveAMDKernelCodeT();
|
||||
|
||||
if (IDVal == ".hsatext")
|
||||
return ParseSectionDirectiveHSAText();
|
||||
|
||||
if (IDVal == ".amdgpu_hsa_kernel")
|
||||
return ParseDirectiveAMDGPUHsaKernel();
|
||||
|
||||
if (IDVal == ".amdgpu_hsa_module_global")
|
||||
return ParseDirectiveAMDGPUHsaModuleGlobal();
|
||||
|
||||
if (IDVal == ".amdgpu_hsa_program_global")
|
||||
return ParseDirectiveAMDGPUHsaProgramGlobal();
|
||||
|
||||
if (IDVal == ".hsadata_global_agent")
|
||||
return ParseSectionDirectiveHSADataGlobalAgent();
|
||||
|
||||
if (IDVal == ".hsadata_global_program")
|
||||
return ParseSectionDirectiveHSADataGlobalProgram();
|
||||
|
||||
if (IDVal == ".hsarodata_readonly_agent")
|
||||
return ParseSectionDirectiveHSARodataReadonlyAgent();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -100,16 +100,6 @@ void AMDGPUTargetAsmStreamer::EmitAMDGPUSymbolType(StringRef SymbolName,
|
|||
}
|
||||
}
|
||||
|
||||
void AMDGPUTargetAsmStreamer::EmitAMDGPUHsaModuleScopeGlobal(
|
||||
StringRef GlobalName) {
|
||||
OS << "\t.amdgpu_hsa_module_global " << GlobalName << '\n';
|
||||
}
|
||||
|
||||
void AMDGPUTargetAsmStreamer::EmitAMDGPUHsaProgramScopeGlobal(
|
||||
StringRef GlobalName) {
|
||||
OS << "\t.amdgpu_hsa_program_global " << GlobalName << '\n';
|
||||
}
|
||||
|
||||
bool AMDGPUTargetAsmStreamer::EmitCodeObjectMetadata(StringRef YamlString) {
|
||||
auto VerifiedYamlString = CodeObjectMetadataStreamer.toYamlString(YamlString);
|
||||
if (!VerifiedYamlString)
|
||||
|
@ -214,24 +204,6 @@ void AMDGPUTargetELFStreamer::EmitAMDGPUSymbolType(StringRef SymbolName,
|
|||
Symbol->setType(ELF::STT_AMDGPU_HSA_KERNEL);
|
||||
}
|
||||
|
||||
void AMDGPUTargetELFStreamer::EmitAMDGPUHsaModuleScopeGlobal(
|
||||
StringRef GlobalName) {
|
||||
|
||||
MCSymbolELF *Symbol = cast<MCSymbolELF>(
|
||||
getStreamer().getContext().getOrCreateSymbol(GlobalName));
|
||||
Symbol->setType(ELF::STT_OBJECT);
|
||||
Symbol->setBinding(ELF::STB_LOCAL);
|
||||
}
|
||||
|
||||
void AMDGPUTargetELFStreamer::EmitAMDGPUHsaProgramScopeGlobal(
|
||||
StringRef GlobalName) {
|
||||
|
||||
MCSymbolELF *Symbol = cast<MCSymbolELF>(
|
||||
getStreamer().getContext().getOrCreateSymbol(GlobalName));
|
||||
Symbol->setType(ELF::STT_OBJECT);
|
||||
Symbol->setBinding(ELF::STB_GLOBAL);
|
||||
}
|
||||
|
||||
bool AMDGPUTargetELFStreamer::EmitCodeObjectMetadata(StringRef YamlString) {
|
||||
auto VerifiedYamlString = CodeObjectMetadataStreamer.toYamlString(YamlString);
|
||||
if (!VerifiedYamlString)
|
||||
|
|
|
@ -44,10 +44,6 @@ public:
|
|||
|
||||
virtual void EmitAMDGPUSymbolType(StringRef SymbolName, unsigned Type) = 0;
|
||||
|
||||
virtual void EmitAMDGPUHsaModuleScopeGlobal(StringRef GlobalName) = 0;
|
||||
|
||||
virtual void EmitAMDGPUHsaProgramScopeGlobal(StringRef GlobalName) = 0;
|
||||
|
||||
virtual void EmitStartOfCodeObjectMetadata(const Module &Mod);
|
||||
|
||||
virtual void EmitKernelCodeObjectMetadata(
|
||||
|
@ -74,10 +70,6 @@ public:
|
|||
|
||||
void EmitAMDGPUSymbolType(StringRef SymbolName, unsigned Type) override;
|
||||
|
||||
void EmitAMDGPUHsaModuleScopeGlobal(StringRef GlobalName) override;
|
||||
|
||||
void EmitAMDGPUHsaProgramScopeGlobal(StringRef GlobalName) override;
|
||||
|
||||
/// \returns True on success, false on failure.
|
||||
bool EmitCodeObjectMetadata(StringRef YamlString) override;
|
||||
};
|
||||
|
@ -105,10 +97,6 @@ public:
|
|||
|
||||
void EmitAMDGPUSymbolType(StringRef SymbolName, unsigned Type) override;
|
||||
|
||||
void EmitAMDGPUHsaModuleScopeGlobal(StringRef GlobalName) override;
|
||||
|
||||
void EmitAMDGPUHsaProgramScopeGlobal(StringRef GlobalName) override;
|
||||
|
||||
/// \returns True on success, false on failure.
|
||||
bool EmitCodeObjectMetadata(StringRef YamlString) override;
|
||||
};
|
||||
|
|
|
@ -327,33 +327,6 @@ void initDefaultAMDKernelCodeT(amd_kernel_code_t &Header,
|
|||
Header.private_segment_alignment = 4;
|
||||
}
|
||||
|
||||
MCSection *getHSATextSection(MCContext &Ctx) {
|
||||
return Ctx.getELFSection(".hsatext", ELF::SHT_PROGBITS,
|
||||
ELF::SHF_ALLOC | ELF::SHF_WRITE |
|
||||
ELF::SHF_EXECINSTR |
|
||||
ELF::SHF_AMDGPU_HSA_AGENT |
|
||||
ELF::SHF_AMDGPU_HSA_CODE);
|
||||
}
|
||||
|
||||
MCSection *getHSADataGlobalAgentSection(MCContext &Ctx) {
|
||||
return Ctx.getELFSection(".hsadata_global_agent", ELF::SHT_PROGBITS,
|
||||
ELF::SHF_ALLOC | ELF::SHF_WRITE |
|
||||
ELF::SHF_AMDGPU_HSA_GLOBAL |
|
||||
ELF::SHF_AMDGPU_HSA_AGENT);
|
||||
}
|
||||
|
||||
MCSection *getHSADataGlobalProgramSection(MCContext &Ctx) {
|
||||
return Ctx.getELFSection(".hsadata_global_program", ELF::SHT_PROGBITS,
|
||||
ELF::SHF_ALLOC | ELF::SHF_WRITE |
|
||||
ELF::SHF_AMDGPU_HSA_GLOBAL);
|
||||
}
|
||||
|
||||
MCSection *getHSARodataReadonlyAgentSection(MCContext &Ctx) {
|
||||
return Ctx.getELFSection(".hsarodata_readonly_agent", ELF::SHT_PROGBITS,
|
||||
ELF::SHF_ALLOC | ELF::SHF_AMDGPU_HSA_READONLY |
|
||||
ELF::SHF_AMDGPU_HSA_AGENT);
|
||||
}
|
||||
|
||||
bool isGroupSegment(const GlobalValue *GV, AMDGPUAS AS) {
|
||||
return GV->getType()->getAddressSpace() == AS.LOCAL_ADDRESS;
|
||||
}
|
||||
|
|
|
@ -149,13 +149,6 @@ int16_t getNamedOperandIdx(uint16_t Opcode, uint16_t NamedIdx);
|
|||
|
||||
void initDefaultAMDKernelCodeT(amd_kernel_code_t &Header,
|
||||
const FeatureBitset &Features);
|
||||
MCSection *getHSATextSection(MCContext &Ctx);
|
||||
|
||||
MCSection *getHSADataGlobalAgentSection(MCContext &Ctx);
|
||||
|
||||
MCSection *getHSADataGlobalProgramSection(MCContext &Ctx);
|
||||
|
||||
MCSection *getHSARodataReadonlyAgentSection(MCContext &Ctx);
|
||||
|
||||
bool isGroupSegment(const GlobalValue *GV, AMDGPUAS AS);
|
||||
bool isGlobalSegment(const GlobalValue *GV, AMDGPUAS AS);
|
||||
|
|
|
@ -3,15 +3,12 @@
|
|||
|
||||
# CHECK: Format: ELF64-amdgpu-hsacobj
|
||||
# CHECK: Arch: amdgcn
|
||||
# CHECK: Machine: EM_AMDGPU (0xE0)
|
||||
# CHECK: Sections [
|
||||
# CHECK: Section {
|
||||
# CHECK: Name: .shf_amdgpu
|
||||
# CHECK: Flags [ (0xF00000)
|
||||
# CHECK: SHF_AMDGPU_HSA_AGENT (0x800000)
|
||||
# CHECK: SHF_AMDGPU_HSA_CODE (0x400000)
|
||||
# CHECK: SHF_AMDGPU_HSA_GLOBAL (0x100000)
|
||||
# CHECK: SHF_AMDGPU_HSA_READONLY (0x200000)
|
||||
# CHECK: ElfHeader {
|
||||
# CHECK: Ident {
|
||||
# CHECK: OS/ABI: AMDGPU_HSA (0x40)
|
||||
# CHECK: ABIVersion: 0
|
||||
# CHECK: }
|
||||
# CHECK: Machine: EM_AMDGPU (0xE0)
|
||||
# CHECK: }
|
||||
|
||||
--- !ELF
|
||||
|
@ -21,10 +18,4 @@ FileHeader:
|
|||
Type: ET_REL
|
||||
Machine: EM_AMDGPU
|
||||
OSABI: ELFOSABI_AMDGPU_HSA
|
||||
|
||||
Sections:
|
||||
- Name: .shf_amdgpu
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [ SHF_AMDGPU_HSA_GLOBAL, SHF_AMDGPU_HSA_READONLY,
|
||||
SHF_AMDGPU_HSA_CODE, SHF_AMDGPU_HSA_AGENT]
|
||||
...
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,11 @@
|
|||
RUN: llvm-readobj -file-headers -program-headers -sections -symbols %p/Inputs/trivial.obj.elf-amdhsa-gfx803 | FileCheck %s
|
||||
|
||||
CHECK: Format: ELF64-amdgpu-hsacobj
|
||||
CHECK: Arch: amdgcn
|
||||
CHECK: ElfHeader {
|
||||
CHECK: Ident {
|
||||
CHECK: OS/ABI: AMDGPU_HSA (0x40)
|
||||
CHECK: ABIVersion: 0
|
||||
CHECK: }
|
||||
CHECK: Machine: EM_AMDGPU (0xE0)
|
||||
CHECK: }
|
|
@ -1,28 +0,0 @@
|
|||
RUN: llvm-readobj -program-headers -sections -symbols -file-headers \
|
||||
RUN: %p/Inputs/trivial.elf-amdhsa-kaveri | FileCheck %s
|
||||
|
||||
CHECK: ElfHeader {
|
||||
CHECK: Ident {
|
||||
CHECK: Class: 64-bit (0x2)
|
||||
CHECK: DataEncoding: LittleEndian (0x1)
|
||||
CHECK: Machine: EM_AMDGPU (0xE0)
|
||||
|
||||
|
||||
CHECK: Section {
|
||||
CHECK: Name: .text
|
||||
CHECK: Type: SHT_PROGBITS (0x1)
|
||||
CHECK: Flags [ (0xC00007
|
||||
CHECK: SHF_ALLOC (0x2)
|
||||
CHECK: SHF_AMDGPU_HSA_AGENT (0x800000)
|
||||
CHECK: SHF_AMDGPU_HSA_CODE (0x400000)
|
||||
CHECK: SHF_EXECINSTR (0x4)
|
||||
CHECK: SHF_WRITE (0x1)
|
||||
|
||||
CHECK: Symbol {
|
||||
CHECK: Name: hello_world
|
||||
CHECK: Value: 0x0
|
||||
CHECK: Binding: Local (0x0)
|
||||
CHECK: Type: AMDGPU_HSA_KERNEL (0xA)
|
||||
|
||||
CHECK: ProgramHeader {
|
||||
CHECK: Type: PT_AMDGPU_HSA_LOAD_CODE_AGENT (0x60000003)
|
|
@ -1,29 +1,6 @@
|
|||
# Check that llvm-readobj shows arch specific ELF section flags.
|
||||
|
||||
# RUN: yaml2obj -docnum 1 %s > %t-amdgpu.o
|
||||
# RUN: llvm-readobj -s %t-amdgpu.o | FileCheck -check-prefix=AMD %s
|
||||
|
||||
# AMD: Flags [ (0x300000)
|
||||
# AMD-NEXT: SHF_AMDGPU_HSA_GLOBAL (0x100000)
|
||||
# AMD-NEXT: SHF_AMDGPU_HSA_READONLY (0x200000)
|
||||
# AMD-NEXT: ]
|
||||
|
||||
# amdgpu.o
|
||||
--- !ELF
|
||||
FileHeader:
|
||||
Class: ELFCLASS64
|
||||
Data: ELFDATA2LSB
|
||||
OSABI: ELFOSABI_GNU
|
||||
Type: ET_REL
|
||||
Machine: EM_AMDGPU
|
||||
Flags: []
|
||||
Sections:
|
||||
- Name: .amdgpu
|
||||
Type: SHT_PROGBITS
|
||||
Flags: [SHF_AMDGPU_HSA_GLOBAL, SHF_AMDGPU_HSA_READONLY]
|
||||
Size: 4
|
||||
|
||||
# RUN: yaml2obj -docnum 2 %s > %t-hex.o
|
||||
# RUN: yaml2obj -docnum 1 %s > %t-hex.o
|
||||
# RUN: llvm-readobj -s %t-hex.o | FileCheck -check-prefix=HEX %s
|
||||
|
||||
# HEX: Flags [ (0x10000000)
|
||||
|
@ -44,7 +21,7 @@ Sections:
|
|||
Flags: [SHF_HEX_GPREL]
|
||||
Size: 4
|
||||
|
||||
# RUN: yaml2obj -docnum 3 %s > %t-mips.o
|
||||
# RUN: yaml2obj -docnum 2 %s > %t-mips.o
|
||||
# RUN: llvm-readobj -s %t-mips.o | FileCheck -check-prefix=MIPS %s
|
||||
|
||||
# MIPS: Flags [ (0x38000000)
|
||||
|
@ -67,7 +44,7 @@ Sections:
|
|||
Flags: [SHF_MIPS_GPREL, SHF_MIPS_MERGE, SHF_MIPS_NOSTRIP]
|
||||
Size: 4
|
||||
|
||||
# RUN: yaml2obj -docnum 4 %s > %t-x86_64.o
|
||||
# RUN: yaml2obj -docnum 3 %s > %t-x86_64.o
|
||||
# RUN: llvm-readobj -s %t-x86_64.o | FileCheck -check-prefix=X86_64 %s
|
||||
|
||||
# X86_64: Flags [ (0x10000000)
|
||||
|
|
|
@ -978,9 +978,7 @@ static const EnumEntry<unsigned> ElfSymbolTypes[] = {
|
|||
{"GNU_IFunc", "IFUNC", ELF::STT_GNU_IFUNC}};
|
||||
|
||||
static const EnumEntry<unsigned> AMDGPUSymbolTypes[] = {
|
||||
{ "AMDGPU_HSA_KERNEL", ELF::STT_AMDGPU_HSA_KERNEL },
|
||||
{ "AMDGPU_HSA_INDIRECT_FUNCTION", ELF::STT_AMDGPU_HSA_INDIRECT_FUNCTION },
|
||||
{ "AMDGPU_HSA_METADATA", ELF::STT_AMDGPU_HSA_METADATA }
|
||||
{ "AMDGPU_HSA_KERNEL", ELF::STT_AMDGPU_HSA_KERNEL }
|
||||
};
|
||||
|
||||
static const char *getGroupType(uint32_t Flag) {
|
||||
|
@ -1012,13 +1010,6 @@ static const EnumEntry<unsigned> ElfXCoreSectionFlags[] = {
|
|||
LLVM_READOBJ_ENUM_ENT(ELF, XCORE_SHF_DP_SECTION)
|
||||
};
|
||||
|
||||
static const EnumEntry<unsigned> ElfAMDGPUSectionFlags[] = {
|
||||
LLVM_READOBJ_ENUM_ENT(ELF, SHF_AMDGPU_HSA_GLOBAL),
|
||||
LLVM_READOBJ_ENUM_ENT(ELF, SHF_AMDGPU_HSA_READONLY),
|
||||
LLVM_READOBJ_ENUM_ENT(ELF, SHF_AMDGPU_HSA_CODE),
|
||||
LLVM_READOBJ_ENUM_ENT(ELF, SHF_AMDGPU_HSA_AGENT)
|
||||
};
|
||||
|
||||
static const EnumEntry<unsigned> ElfARMSectionFlags[] = {
|
||||
LLVM_READOBJ_ENUM_ENT(ELF, SHF_ARM_PURECODE)
|
||||
};
|
||||
|
@ -1077,13 +1068,6 @@ static const char *getElfSegmentType(unsigned Arch, unsigned Type) {
|
|||
// Check potentially overlapped processor-specific
|
||||
// program header type.
|
||||
switch (Arch) {
|
||||
case ELF::EM_AMDGPU:
|
||||
switch (Type) {
|
||||
LLVM_READOBJ_ENUM_CASE(ELF, PT_AMDGPU_HSA_LOAD_GLOBAL_PROGRAM);
|
||||
LLVM_READOBJ_ENUM_CASE(ELF, PT_AMDGPU_HSA_LOAD_GLOBAL_AGENT);
|
||||
LLVM_READOBJ_ENUM_CASE(ELF, PT_AMDGPU_HSA_LOAD_READONLY_AGENT);
|
||||
LLVM_READOBJ_ENUM_CASE(ELF, PT_AMDGPU_HSA_LOAD_CODE_AGENT);
|
||||
}
|
||||
case ELF::EM_ARM:
|
||||
switch (Type) {
|
||||
LLVM_READOBJ_ENUM_CASE(ELF, PT_ARM_EXIDX);
|
||||
|
@ -1139,14 +1123,6 @@ static std::string getElfPtType(unsigned Arch, unsigned Type) {
|
|||
default:
|
||||
// All machine specific PT_* types
|
||||
switch (Arch) {
|
||||
case ELF::EM_AMDGPU:
|
||||
switch (Type) {
|
||||
LLVM_READOBJ_ENUM_CASE(ELF, PT_AMDGPU_HSA_LOAD_GLOBAL_PROGRAM);
|
||||
LLVM_READOBJ_ENUM_CASE(ELF, PT_AMDGPU_HSA_LOAD_GLOBAL_AGENT);
|
||||
LLVM_READOBJ_ENUM_CASE(ELF, PT_AMDGPU_HSA_LOAD_READONLY_AGENT);
|
||||
LLVM_READOBJ_ENUM_CASE(ELF, PT_AMDGPU_HSA_LOAD_CODE_AGENT);
|
||||
}
|
||||
return "";
|
||||
case ELF::EM_ARM:
|
||||
if (Type == ELF::PT_ARM_EXIDX)
|
||||
return "EXIDX";
|
||||
|
@ -3592,10 +3568,6 @@ template <class ELFT> void LLVMStyle<ELFT>::printSections(const ELFO *Obj) {
|
|||
std::vector<EnumEntry<unsigned>> SectionFlags(std::begin(ElfSectionFlags),
|
||||
std::end(ElfSectionFlags));
|
||||
switch (Obj->getHeader()->e_machine) {
|
||||
case EM_AMDGPU:
|
||||
SectionFlags.insert(SectionFlags.end(), std::begin(ElfAMDGPUSectionFlags),
|
||||
std::end(ElfAMDGPUSectionFlags));
|
||||
break;
|
||||
case EM_ARM:
|
||||
SectionFlags.insert(SectionFlags.end(), std::begin(ElfARMSectionFlags),
|
||||
std::end(ElfARMSectionFlags));
|
||||
|
|
Loading…
Reference in New Issue