Home
last modified time | relevance | path

Searched refs:ELF (Results 1 – 25 of 274) sorted by relevance

1234567891011

/NextBSD/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/
HDHexagonELFObjectWriter.cpp37 : MCELFObjectTargetWriter(/*Is64bit*/ false, OSABI, ELF::EM_HEXAGON, in HexagonELFObjectWriter()
48 return ELF::R_HEX_NONE; in GetRelocType()
50 return (IsPCRel) ? ELF::R_HEX_32_PCREL : ELF::R_HEX_32; in GetRelocType()
52 return ELF::R_HEX_32_PCREL; in GetRelocType()
54 return ELF::R_HEX_16; in GetRelocType()
56 return ELF::R_HEX_8; in GetRelocType()
58 return ELF::R_HEX_B22_PCREL; in GetRelocType()
60 return ELF::R_HEX_B15_PCREL; in GetRelocType()
62 return ELF::R_HEX_B7_PCREL; in GetRelocType()
64 return ELF::R_HEX_LO16; in GetRelocType()
[all …]
HDHexagonMCELFStreamer.cpp101 ELFSymbol->setBinding(ELF::STB_GLOBAL); in HexagonMCEmitCommonSymbol()
105 ELFSymbol->setType(ELF::STT_OBJECT); in HexagonMCEmitCommonSymbol()
107 if (ELFSymbol->getBinding() == ELF::STB_LOCAL) { in HexagonMCEmitCommonSymbol()
115 SectionName, ELF::SHT_NOBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC); in HexagonMCEmitCommonSymbol()
128 ? ELF::SHN_HEXAGON_SCOMMON + (Log2_64(AccessSize) + 1) in HexagonMCEmitCommonSymbol()
129 : (unsigned)ELF::SHN_HEXAGON_SCOMMON; in HexagonMCEmitCommonSymbol()
142 ELFSymbol->setBinding(ELF::STB_LOCAL); in HexagonMCEmitLocalCommonSymbol()
/NextBSD/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/
HDPPCELFObjectWriter.cpp38 Is64Bit ? ELF::EM_PPC64 : ELF::EM_PPC, in PPCELFObjectWriter()
85 Type = ELF::R_PPC_REL24; in GetRelocType()
88 Type = ELF::R_PPC_PLTREL24; in GetRelocType()
91 Type = ELF::R_PPC_LOCAL24PC; in GetRelocType()
97 Type = ELF::R_PPC_REL14; in GetRelocType()
103 Type = ELF::R_PPC_REL16; in GetRelocType()
106 Type = ELF::R_PPC_REL16_LO; in GetRelocType()
109 Type = ELF::R_PPC_REL16_HI; in GetRelocType()
112 Type = ELF::R_PPC_REL16_HA; in GetRelocType()
118 Type = ELF::R_PPC_REL32; in GetRelocType()
[all …]
/NextBSD/contrib/llvm/lib/Target/Sparc/MCTargetDesc/
HDSparcELFObjectWriter.cpp26 Is64Bit ? ELF::EM_SPARCV9 : ELF::EM_SPARC, in SparcELFObjectWriter()
47 return ELF::R_SPARC_DISP32; in GetRelocType()
54 case FK_Data_1: return ELF::R_SPARC_DISP8; in GetRelocType()
55 case FK_Data_2: return ELF::R_SPARC_DISP16; in GetRelocType()
56 case FK_Data_4: return ELF::R_SPARC_DISP32; in GetRelocType()
57 case FK_Data_8: return ELF::R_SPARC_DISP64; in GetRelocType()
58 case Sparc::fixup_sparc_call30: return ELF::R_SPARC_WDISP30; in GetRelocType()
59 case Sparc::fixup_sparc_br22: return ELF::R_SPARC_WDISP22; in GetRelocType()
60 case Sparc::fixup_sparc_br19: return ELF::R_SPARC_WDISP19; in GetRelocType()
61 case Sparc::fixup_sparc_pc22: return ELF::R_SPARC_PC22; in GetRelocType()
[all …]
/NextBSD/contrib/llvm/lib/Target/Mips/MCTargetDesc/
HDMipsELFObjectWriter.cpp58 : MCELFObjectTargetWriter(_is64Bit, OSABI, ELF::EM_MIPS, in MipsELFObjectWriter()
73 return IsPCRel ? ELF::R_MIPS_PC16 : ELF::R_MIPS_16; in GetRelocType()
76 return IsPCRel ? ELF::R_MIPS_PC32 : ELF::R_MIPS_32; in GetRelocType()
83 return ELF::R_MIPS_PC16; in GetRelocType()
85 return ELF::R_MICROMIPS_PC7_S1; in GetRelocType()
87 return ELF::R_MICROMIPS_PC10_S1; in GetRelocType()
89 return ELF::R_MICROMIPS_PC16_S1; in GetRelocType()
91 return ELF::R_MIPS_PC19_S2; in GetRelocType()
93 return ELF::R_MIPS_PC18_S3; in GetRelocType()
95 return ELF::R_MIPS_PC21_S2; in GetRelocType()
[all …]
HDMipsTargetStreamer.cpp441 EFlags |= ELF::EF_MIPS_ARCH_64R6; in MipsTargetELFStreamer()
445 EFlags |= ELF::EF_MIPS_ARCH_64R2; in MipsTargetELFStreamer()
447 EFlags |= ELF::EF_MIPS_ARCH_64; in MipsTargetELFStreamer()
449 EFlags |= ELF::EF_MIPS_ARCH_5; in MipsTargetELFStreamer()
451 EFlags |= ELF::EF_MIPS_ARCH_4; in MipsTargetELFStreamer()
453 EFlags |= ELF::EF_MIPS_ARCH_3; in MipsTargetELFStreamer()
455 EFlags |= ELF::EF_MIPS_ARCH_32R6; in MipsTargetELFStreamer()
459 EFlags |= ELF::EF_MIPS_ARCH_32R2; in MipsTargetELFStreamer()
461 EFlags |= ELF::EF_MIPS_ARCH_32; in MipsTargetELFStreamer()
463 EFlags |= ELF::EF_MIPS_ARCH_2; in MipsTargetELFStreamer()
[all …]
/NextBSD/contrib/llvm/lib/Target/AArch64/MCTargetDesc/
HDAArch64ELFObjectWriter.cpp41 : MCELFObjectTargetWriter(/*Is64Bit*/ true, OSABI, ELF::EM_AARCH64, in AArch64ELFObjectWriter()
65 return ELF::R_AARCH64_PREL16; in GetRelocType()
67 return ELF::R_AARCH64_PREL32; in GetRelocType()
69 return ELF::R_AARCH64_PREL64; in GetRelocType()
72 return ELF::R_AARCH64_ADR_PREL_LO21; in GetRelocType()
75 return ELF::R_AARCH64_ADR_PREL_PG_HI21; in GetRelocType()
77 return ELF::R_AARCH64_ADR_GOT_PAGE; in GetRelocType()
79 return ELF::R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21; in GetRelocType()
81 return ELF::R_AARCH64_TLSDESC_ADR_PAGE21; in GetRelocType()
84 return ELF::R_AARCH64_JUMP26; in GetRelocType()
[all …]
/NextBSD/contrib/llvm/tools/llvm-readobj/
HDELFDumper.cpp35 using namespace ELF;
192 { "None", ELF::ELFCLASSNONE },
193 { "32-bit", ELF::ELFCLASS32 },
194 { "64-bit", ELF::ELFCLASS64 },
198 { "None", ELF::ELFDATANONE },
199 { "LittleEndian", ELF::ELFDATA2LSB },
200 { "BigEndian", ELF::ELFDATA2MSB },
204 { "None", ELF::ET_NONE },
205 { "Relocatable", ELF::ET_REL },
206 { "Executable", ELF::ET_EXEC },
[all …]
/NextBSD/contrib/llvm/lib/Target/XCore/
HDXCoreTargetObjectFile.cpp24 BSSSection = Ctx.getELFSection(".dp.bss", ELF::SHT_NOBITS, in Initialize()
25 ELF::SHF_ALLOC | ELF::SHF_WRITE | in Initialize()
26 ELF::XCORE_SHF_DP_SECTION); in Initialize()
27 BSSSectionLarge = Ctx.getELFSection(".dp.bss.large", ELF::SHT_NOBITS, in Initialize()
28 ELF::SHF_ALLOC | ELF::SHF_WRITE | in Initialize()
29 ELF::XCORE_SHF_DP_SECTION); in Initialize()
30 DataSection = Ctx.getELFSection(".dp.data", ELF::SHT_PROGBITS, in Initialize()
31 ELF::SHF_ALLOC | ELF::SHF_WRITE | in Initialize()
32 ELF::XCORE_SHF_DP_SECTION); in Initialize()
33 DataSectionLarge = Ctx.getELFSection(".dp.data.large", ELF::SHT_PROGBITS, in Initialize()
[all …]
/NextBSD/contrib/llvm/lib/Target/ARM/MCTargetDesc/
HDARMELFObjectWriter.cpp47 ELF::EM_ARM, in ARMELFObjectWriter()
61 case ELF::R_ARM_PREL31: in needsRelocateWithSymbol()
62 case ELF::R_ARM_ABS32: in needsRelocateWithSymbol()
86 return ELF::R_ARM_NONE; in GetRelocTypeInner()
91 Type = ELF::R_ARM_REL32; in GetRelocTypeInner()
96 Type = ELF::R_ARM_TLS_IE32; in GetRelocTypeInner()
99 Type = ELF::R_ARM_GOT_PREL; in GetRelocTypeInner()
107 Type = ELF::R_ARM_CALL; in GetRelocTypeInner()
110 Type = ELF::R_ARM_TLS_CALL; in GetRelocTypeInner()
113 Type = ELF::R_ARM_CALL; in GetRelocTypeInner()
[all …]
/NextBSD/contrib/llvm/lib/MC/
HDMCSymbolELF.cpp49 case ELF::STB_LOCAL: in setBinding()
52 case ELF::STB_GLOBAL: in setBinding()
55 case ELF::STB_WEAK: in setBinding()
58 case ELF::STB_GNU_UNIQUE: in setBinding()
73 return ELF::STB_LOCAL; in getBinding()
75 return ELF::STB_GLOBAL; in getBinding()
77 return ELF::STB_WEAK; in getBinding()
79 return ELF::STB_GNU_UNIQUE; in getBinding()
84 return ELF::STB_LOCAL; in getBinding()
86 return ELF::STB_GLOBAL; in getBinding()
[all …]
HDMCSectionELF.cpp80 !(Flags & ELF::SHF_MERGE)) { in PrintSwitchToSection()
81 if (Flags & ELF::SHF_ALLOC) in PrintSwitchToSection()
83 if (Flags & ELF::SHF_EXECINSTR) in PrintSwitchToSection()
85 if (Flags & ELF::SHF_WRITE) in PrintSwitchToSection()
87 if (Flags & ELF::SHF_EXCLUDE) in PrintSwitchToSection()
89 if (Flags & ELF::SHF_TLS) in PrintSwitchToSection()
96 if (Flags & ELF::SHF_ALLOC) in PrintSwitchToSection()
98 if (Flags & ELF::SHF_EXCLUDE) in PrintSwitchToSection()
100 if (Flags & ELF::SHF_EXECINSTR) in PrintSwitchToSection()
102 if (Flags & ELF::SHF_GROUP) in PrintSwitchToSection()
[all …]
HDMCObjectFileInfo.cpp396 EHSectionType = ELF::SHT_PROGBITS; in initELFMCObjectFileInfo()
397 EHSectionFlags = ELF::SHF_ALLOC; in initELFMCObjectFileInfo()
400 EHSectionType = ELF::SHT_X86_64_UNWIND; in initELFMCObjectFileInfo()
402 EHSectionFlags |= ELF::SHF_WRITE; in initELFMCObjectFileInfo()
407 BSSSection = Ctx->getELFSection(".bss", ELF::SHT_NOBITS, in initELFMCObjectFileInfo()
408 ELF::SHF_WRITE | ELF::SHF_ALLOC); in initELFMCObjectFileInfo()
410 TextSection = Ctx->getELFSection(".text", ELF::SHT_PROGBITS, in initELFMCObjectFileInfo()
411 ELF::SHF_EXECINSTR | ELF::SHF_ALLOC); in initELFMCObjectFileInfo()
413 DataSection = Ctx->getELFSection(".data", ELF::SHT_PROGBITS, in initELFMCObjectFileInfo()
414 ELF::SHF_WRITE | ELF::SHF_ALLOC); in initELFMCObjectFileInfo()
[all …]
HDELFObjectWriter.cpp87 if (LHSType == ELF::STT_SECTION && RHSType != ELF::STT_SECTION) in operator <()
89 if (LHSType != ELF::STT_SECTION && RHSType == ELF::STT_SECTION) in operator <()
91 if (LHSType == ELF::STT_SECTION && RHSType == ELF::STT_SECTION) in operator <()
262 bool LargeIndex = shndx >= ELF::SHN_LORESERVE && !Reserved; in writeSymbol()
274 uint16_t Index = LargeIndex ? uint16_t(ELF::SHN_XINDEX) : shndx; in writeSymbol()
315 writeBytes(ELF::ElfMagic); // e_ident[EI_MAG0] to e_ident[EI_MAG3] in writeHeader()
317 write8(is64Bit() ? ELF::ELFCLASS64 : ELF::ELFCLASS32); // e_ident[EI_CLASS] in writeHeader()
320 write8(isLittleEndian() ? ELF::ELFDATA2LSB : ELF::ELFDATA2MSB); in writeHeader()
322 write8(ELF::EV_CURRENT); // e_ident[EI_VERSION] in writeHeader()
327 WriteZeros(ELF::EI_NIDENT - ELF::EI_PAD); in writeHeader()
[all …]
HDMCELFStreamer.cpp116 if (Section.getFlags() & ELF::SHF_TLS) in EmitLabel()
117 Symbol->setType(ELF::STT_TLS); in EmitLabel()
169 Begin->setType(ELF::STT_SECTION); in ChangeSection()
188 for (unsigned Type : {ELF::STT_NOTYPE, ELF::STT_OBJECT, ELF::STT_FUNC, in CombineSymbolTypes()
189 ELF::STT_GNU_IFUNC, ELF::STT_TLS}) { in CombineSymbolTypes()
240 Symbol->setType(CombineSymbolTypes(Symbol->getType(), ELF::STT_OBJECT)); in EmitSymbolAttribute()
241 Symbol->setBinding(ELF::STB_GNU_UNIQUE); in EmitSymbolAttribute()
246 Symbol->setBinding(ELF::STB_GLOBAL); in EmitSymbolAttribute()
252 Symbol->setBinding(ELF::STB_WEAK); in EmitSymbolAttribute()
257 Symbol->setBinding(ELF::STB_LOCAL); in EmitSymbolAttribute()
[all …]
/NextBSD/contrib/llvm/lib/Target/X86/MCTargetDesc/
HDX86ELFObjectWriter.cpp37 /*HasRelocationAddend*/ EMachine != ELF::EM_386) {} in X86ELFObjectWriter()
86 return IsPCRel ? ELF::R_X86_64_PC64 : ELF::R_X86_64_64; in getRelocType64()
88 return IsPCRel ? ELF::R_X86_64_PC32 : ELF::R_X86_64_32; in getRelocType64()
90 return ELF::R_X86_64_32S; in getRelocType64()
92 return IsPCRel ? ELF::R_X86_64_PC16 : ELF::R_X86_64_16; in getRelocType64()
94 return IsPCRel ? ELF::R_X86_64_PC8 : ELF::R_X86_64_8; in getRelocType64()
99 return IsPCRel ? ELF::R_X86_64_GOTPC64 : ELF::R_X86_64_GOT64; in getRelocType64()
101 return IsPCRel ? ELF::R_X86_64_GOTPC32 : ELF::R_X86_64_GOT32; in getRelocType64()
110 return ELF::R_X86_64_GOTOFF64; in getRelocType64()
115 return ELF::R_X86_64_TPOFF64; in getRelocType64()
[all …]
/NextBSD/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/
HDRuntimeDyldELF.cpp232 case ELF::R_X86_64_64: { in resolveX86_64Relocation()
238 case ELF::R_X86_64_32: in resolveX86_64Relocation()
239 case ELF::R_X86_64_32S: { in resolveX86_64Relocation()
241 assert((Type == ELF::R_X86_64_32 && (Value <= UINT32_MAX)) || in resolveX86_64Relocation()
242 (Type == ELF::R_X86_64_32S && in resolveX86_64Relocation()
250 case ELF::R_X86_64_PC32: { in resolveX86_64Relocation()
258 case ELF::R_X86_64_PC64: { in resolveX86_64Relocation()
271 case ELF::R_386_32: { in resolveX86Relocation()
275 case ELF::R_386_PC32: { in resolveX86Relocation()
306 case ELF::R_AARCH64_ABS64: { in resolveAArch64Relocation()
[all …]
/NextBSD/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/
HDSystemZMCObjectWriter.cpp33 : MCELFObjectTargetWriter(/*Is64Bit=*/true, OSABI, ELF::EM_S390, in SystemZObjectWriter()
42 case FK_Data_1: return ELF::R_390_8; in getAbsoluteReloc()
43 case FK_Data_2: return ELF::R_390_16; in getAbsoluteReloc()
44 case FK_Data_4: return ELF::R_390_32; in getAbsoluteReloc()
45 case FK_Data_8: return ELF::R_390_64; in getAbsoluteReloc()
53 case FK_Data_2: return ELF::R_390_PC16; in getPCRelReloc()
54 case FK_Data_4: return ELF::R_390_PC32; in getPCRelReloc()
55 case FK_Data_8: return ELF::R_390_PC64; in getPCRelReloc()
56 case SystemZ::FK_390_PC16DBL: return ELF::R_390_PC16DBL; in getPCRelReloc()
57 case SystemZ::FK_390_PC32DBL: return ELF::R_390_PC32DBL; in getPCRelReloc()
[all …]
/NextBSD/contrib/llvm/lib/MC/MCParser/
HDELFAsmParser.cpp83 return ParseSectionSwitch(".data", ELF::SHT_PROGBITS, in ParseSectionDirectiveData()
84 ELF::SHF_WRITE |ELF::SHF_ALLOC, in ParseSectionDirectiveData()
88 return ParseSectionSwitch(".text", ELF::SHT_PROGBITS, in ParseSectionDirectiveText()
89 ELF::SHF_EXECINSTR | in ParseSectionDirectiveText()
90 ELF::SHF_ALLOC, SectionKind::getText()); in ParseSectionDirectiveText()
93 return ParseSectionSwitch(".bss", ELF::SHT_NOBITS, in ParseSectionDirectiveBSS()
94 ELF::SHF_WRITE | in ParseSectionDirectiveBSS()
95 ELF::SHF_ALLOC, SectionKind::getBSS()); in ParseSectionDirectiveBSS()
98 return ParseSectionSwitch(".rodata", ELF::SHT_PROGBITS, in ParseSectionDirectiveRoData()
99 ELF::SHF_ALLOC, in ParseSectionDirectiveRoData()
[all …]
/NextBSD/contrib/llvm/lib/Object/
HDELF.cpp16 case ELF::name: \
21 case ELF::EM_X86_64: in getELFRelocationTypeName()
28 case ELF::EM_386: in getELFRelocationTypeName()
35 case ELF::EM_MIPS: in getELFRelocationTypeName()
42 case ELF::EM_AARCH64: in getELFRelocationTypeName()
49 case ELF::EM_ARM: in getELFRelocationTypeName()
56 case ELF::EM_HEXAGON: in getELFRelocationTypeName()
63 case ELF::EM_PPC: in getELFRelocationTypeName()
70 case ELF::EM_PPC64: in getELFRelocationTypeName()
77 case ELF::EM_S390: in getELFRelocationTypeName()
[all …]
HDELFYAML.cpp27 #define ECase(X) IO.enumCase(Value, #X, ELF::X); in enumeration()
40 #define ECase(X) IO.enumCase(Value, #X, ELF::X); in enumeration()
201 #define ECase(X) IO.enumCase(Value, #X, ELF::X); in enumeration()
211 #define ECase(X) IO.enumCase(Value, #X, ELF::X); in enumeration()
221 #define ECase(X) IO.enumCase(Value, #X, ELF::X); in enumeration()
251 #define BCase(X) IO.bitSetCase(Value, #X, ELF::X); in bitset()
252 #define BCaseMask(X, M) IO.maskedBitSetCase(Value, #X, ELF::X, ELF::M); in bitset()
254 case ELF::EM_ARM: in bitset()
264 case ELF::EM_MIPS: in bitset()
309 case ELF::EM_HEXAGON: in bitset()
[all …]
/NextBSD/contrib/llvm/include/llvm/Object/
HDELFObjectFile.h254 assert(SymTable->sh_type == ELF::SHT_SYMTAB || in toDRI()
255 SymTable->sh_type == ELF::SHT_DYNSYM); in toDRI()
289 if ((Binding == ELF::STB_GLOBAL || Binding == ELF::STB_WEAK) && in isExportedToOtherDSO()
290 (Visibility == ELF::STV_DEFAULT || Visibility == ELF::STV_PROTECTED)) in isExportedToOtherDSO()
376 if (ESym->st_shndx == ELF::SHN_ABS) in getSymbolValueImpl()
381 if ((Header->e_machine == ELF::EM_ARM || Header->e_machine == ELF::EM_MIPS) && in getSymbolValueImpl()
382 ESym->getType() == ELF::STT_FUNC) in getSymbolValueImpl()
394 case ELF::SHN_COMMON: in getSymbolAddress()
395 case ELF::SHN_UNDEF: in getSymbolAddress()
396 case ELF::SHN_ABS: in getSymbolAddress()
[all …]
HDRelocVisitor.h75 case llvm::ELF::R_X86_64_NONE: in visitELF()
77 case llvm::ELF::R_X86_64_64: in visitELF()
79 case llvm::ELF::R_X86_64_PC32: in visitELF()
81 case llvm::ELF::R_X86_64_32: in visitELF()
83 case llvm::ELF::R_X86_64_32S: in visitELF()
91 case llvm::ELF::R_AARCH64_ABS32: in visitELF()
93 case llvm::ELF::R_AARCH64_ABS64: in visitELF()
102 case llvm::ELF::R_MIPS_32: in visitELF()
104 case llvm::ELF::R_MIPS_64: in visitELF()
113 case llvm::ELF::R_PPC64_ADDR32: in visitELF()
[all …]
HDELF.h45 if (Object.size() < ELF::EI_NIDENT) in getElfArchType()
46 return std::make_pair((uint8_t)ELF::ELFCLASSNONE, in getElfArchType()
47 (uint8_t)ELF::ELFDATANONE); in getElfArchType()
48 return std::make_pair((uint8_t)Object[ELF::EI_CLASS], in getElfArchType()
49 (uint8_t)Object[ELF::EI_DATA]); in getElfArchType()
183 DenseMap<const Elf_Sym *, ELF::Elf64_Word> ExtendedSymbolTable;
266 return Header->e_machine == ELF::EM_MIPS && in isMipsELF64()
267 Header->getFileClass() == ELF::ELFCLASS64; in isMipsELF64()
271 return Header->e_machine == ELF::EM_MIPS && in isMips64EL()
272 Header->getFileClass() == ELF::ELFCLASS64 && in isMips64EL()
[all …]
/NextBSD/contrib/llvm/tools/llvm-objdump/
HDELFDump.cpp31 case ELF::PT_LOAD: in printProgramHeaders()
34 case ELF::PT_GNU_STACK: in printProgramHeaders()
37 case ELF::PT_GNU_EH_FRAME: in printProgramHeaders()
40 case ELF::PT_INTERP: in printProgramHeaders()
43 case ELF::PT_DYNAMIC: in printProgramHeaders()
46 case ELF::PT_PHDR: in printProgramHeaders()
49 case ELF::PT_TLS: in printProgramHeaders()
70 << ((pi->p_flags & ELF::PF_R) ? "r" : "-") in printProgramHeaders()
71 << ((pi->p_flags & ELF::PF_W) ? "w" : "-") in printProgramHeaders()
72 << ((pi->p_flags & ELF::PF_X) ? "x" : "-") in printProgramHeaders()

1234567891011