| /freebsd/contrib/llvm-project/llvm/include/llvm/Object/ |
| H A D | ELFTypes.h | 30 template <class ELFT> struct Elf_Ehdr_Impl; 31 template <class ELFT> struct Elf_Shdr_Impl; 32 template <class ELFT> struct Elf_Sym_Impl; 33 template <class ELFT> struct Elf_Dyn_Impl; 34 template <class ELFT> struct Elf_Phdr_Impl; 35 template <class ELFT, bool isRela> struct Elf_Rel_Impl; 37 template <class ELFT> struct Elf_Verdef_Impl; 38 template <class ELFT> struct Elf_Verdaux_Impl; 39 template <class ELFT> struct Elf_Verneed_Impl; 40 template <class ELFT> struct Elf_Vernaux_Impl; [all …]
|
| H A D | ELFObjectFile.h | 268 template <class ELFT> class ELFObjectFile : public ELFObjectFileBase { 275 LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) in LLVM_ELF_IMPORT_TYPES_ELFT() argument 288 ELFObjectFile(MemoryBufferRef Object, ELFFile<ELFT> EF, 295 ELFFile<ELFT> EF; 443 if (Error E = Attributes.parse(Contents, ELFT::Endianness)) in getBuildAttributes() 456 ELFObjectFile(ELFObjectFile<ELFT> &&Other); 457 static Expected<ELFObjectFile<ELFT>> create(MemoryBufferRef Object, 502 const ELFFile<ELFT> &getELFFile() const { return EF; } in getELFFile() 507 getELFType(ELFT::Endianness == llvm::endianness::little, in classof() 508 ELFT::Is64Bits); in classof() [all …]
|
| H A D | ELF.h | 98 template <class ELFT> class ELFFile; 130 template <class ELFT> 131 static std::string getSecIndexForError(const ELFFile<ELFT> &Obj, in getSecIndexForError() 132 const typename ELFT::Shdr &Sec) { in getSecIndexForError() 144 template <class ELFT> 145 static std::string describe(const ELFFile<ELFT> &Obj, in describe() 146 const typename ELFT::Shdr &Sec) { in describe() 154 template <class ELFT> 155 static std::string getPhdrIndexForError(const ELFFile<ELFT> &Obj, in getPhdrIndexForError() 156 const typename ELFT::Phdr &Phdr) { in getPhdrIndexForError() [all …]
|
| /freebsd/contrib/llvm-project/llvm/tools/llvm-objdump/ |
| H A D | ELFDump.cpp | 27 template <typename ELFT> class ELFDumper : public Dumper { 29 ELFDumper(const ELFObjectFile<ELFT> &O) : Dumper(O), Obj(O) {} in ELFDumper() 34 const ELFObjectFile<ELFT> &Obj; 36 const ELFFile<ELFT> &getELFFile() const { return Obj.getELFFile(); } in getELFFile() 40 void printSymbolVersionDependency(const typename ELFT::Shdr &Sec); 44 template <class ELFT> 45 static std::unique_ptr<Dumper> createDumper(const ELFObjectFile<ELFT> &Obj) { in createDumper() 46 return std::make_unique<ELFDumper<ELFT>>(Obj); in createDumper() 60 template <class ELFT> 61 static Expected<StringRef> getDynamicStrTab(const ELFFile<ELFT> &Elf) { in getDynamicStrTab() [all …]
|
| /freebsd/contrib/llvm-project/llvm/tools/llvm-readobj/ |
| H A D | ELFDumper.cpp | 94 template <class ELFT> struct RelSymbol { 95 RelSymbol(const typename ELFT::Sym *S, StringRef N) in RelSymbol() 97 const typename ELFT::Sym *Sym; 193 template <class ELFT> class Relocation { 195 Relocation(const typename ELFT::Rel &R, bool IsMips64EL) in Relocation() 199 Relocation(const typename ELFT::Rela &R, bool IsMips64EL) in Relocation() 200 : Relocation((const typename ELFT::Rel &)R, IsMips64EL) { in Relocation() 206 typename ELFT::uint Offset; 207 typename ELFT::uint Info; 211 template <class ELFT> class MipsGOTParser; [all …]
|
| H A D | DwarfCFIEHPrinter.h | 32 template <typename ELFT> class PrinterContext { 33 using Elf_Shdr = typename ELFT::Shdr; 34 using Elf_Phdr = typename ELFT::Phdr; 37 const object::ELFObjectFile<ELFT> &ObjF; 43 PrinterContext(ScopedPrinter &W, const object::ELFObjectFile<ELFT> &ObjF) in PrinterContext() 49 template <class ELFT> 50 static const typename ELFT::Shdr * 51 findSectionByAddress(const object::ELFObjectFile<ELFT> &ObjF, uint64_t Addr) { in findSectionByAddress() 52 Expected<typename ELFT::ShdrRange> SectionsOrErr = in findSectionByAddress() 57 for (const typename ELFT::Shdr &Shdr : *SectionsOrErr) in findSectionByAddress() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/InterfaceStub/ |
| H A D | ELFObjHandler.cpp | 51 template <class ELFT> 52 static void initELFHeader(typename ELFT::Ehdr &ElfHeader, uint16_t Machine) { in initELFHeader() 59 ElfHeader.e_ident[EI_CLASS] = ELFT::Is64Bits ? ELFCLASS64 : ELFCLASS32; in initELFHeader() 60 bool IsLittleEndian = ELFT::Endianness == llvm::endianness::little; in initELFHeader() 69 ElfHeader.e_ehsize = sizeof(typename ELFT::Ehdr); in initELFHeader() 70 ElfHeader.e_phentsize = sizeof(typename ELFT::Phdr); in initELFHeader() 71 ElfHeader.e_shentsize = sizeof(typename ELFT::Shdr); in initELFHeader() 75 template <class ELFT> struct OutputSection { 76 using Elf_Shdr = typename ELFT::Shdr; 87 template <class T, class ELFT> [all …]
|
| /freebsd/contrib/llvm-project/lld/ELF/ |
| H A D | DWARF.cpp | 25 template <class ELFT> LLDDwarfObj<ELFT>::LLDDwarfObj(ObjFile<ELFT> *obj) { in LLDDwarfObj() 27 ArrayRef<typename ELFT::Shdr> objSections = obj->template getELFShdrs<ELFT>(); in LLDDwarfObj() 87 template <class ELFT> struct LLDRelocationResolver<Elf_Rel_Impl<ELFT, false>> { 100 template <class ELFT> 103 LLDDwarfObj<ELFT>::findAux(const InputSectionBase &sec, uint64_t pos, in findAux() 111 const ObjFile<ELFT> *file = sec.getFile<ELFT>(); in findAux() 114 const typename ELFT::Sym &sym = file->template getELFSyms<ELFT>()[symIndex]; in findAux() 127 d.p = getAddend<ELFT>(rel); in findAux() 133 template <class ELFT> 135 LLDDwarfObj<ELFT>::find(const llvm::DWARFSection &s, uint64_t pos) const { in find() [all …]
|
| H A D | InputFiles.h | 185 template <typename ELFT> llvm::object::ELFFile<ELFT> getObj() const { in getObj() 186 return check(llvm::object::ELFFile<ELFT>::create(mb.getBuffer())); in getObj() 205 template <typename ELFT> typename ELFT::ShdrRange getELFShdrs() const { in getELFShdrs() 206 return typename ELFT::ShdrRange( in getELFShdrs() 207 reinterpret_cast<const typename ELFT::Shdr *>(elfShdrs), numELFShdrs); in getELFShdrs() 209 template <typename ELFT> typename ELFT::SymRange getELFSyms() const { in getELFSyms() 210 return typename ELFT::SymRange( in getELFSyms() 211 reinterpret_cast<const typename ELFT::Sym *>(elfSyms), numSymbols); in getELFSyms() 213 template <typename ELFT> typename ELFT::SymRange getGlobalELFSyms() const { in getGlobalELFSyms() 214 return getELFSyms<ELFT>().slice(firstGlobal); in getGlobalELFSyms() [all …]
|
| H A D | InputSection.h | 33 template <class ELFT> class ObjFile; 37 template <class ELFT> struct RelsOrRelas { 38 Relocs<typename ELFT::Rel> rels; 39 Relocs<typename ELFT::Rela> relas; 40 Relocs<typename ELFT::Crel> crels; 47 const RelsOrRelas<ELFT> rs = (sec).template relsOrRelas<ELFT>(); \ 156 template <class ELFT> 157 InputSectionBase(ObjFile<ELFT> &file, const typename ELFT::Shdr &header, 198 template <class ELFT> ObjFile<ELFT> *getFile() const { in getFile() 199 return cast<ObjFile<ELFT>>(file); in getFile() [all …]
|
| H A D | MarkLive.cpp | 56 template <class ELFT, bool TrackWhyLive> class MarkLive { 95 template <class ELFT> 97 const typename ELFT::Rel &rel) { in getAddend() 102 template <class ELFT> 104 const typename ELFT::Rela &rel) { in getAddend() 109 template <class ELFT> 111 const typename ELFT::Crel &rel) { in getAddend() 115 template <class ELFT, bool TrackWhyLive> 117 void MarkLive<ELFT, TrackWhyLive>::resolveReloc(InputSectionBase &sec, in resolveReloc() 134 offset += getAddend<ELFT>(ctx, sec, rel); in resolveReloc() [all …]
|
| H A D | ICF.cpp | 97 template <class ELFT> class ICF { 198 template <class ELFT> 199 void ICF<ELFT>::segregate(size_t begin, size_t end, uint32_t eqClassBase, in segregate() 237 template <class ELFT> 239 bool ICF<ELFT>::constantEq(const InputSection *secA, Relocs<RelTy> ra, in constantEq() 249 uint64_t addA = getAddend<ELFT>(*rai); in constantEq() 250 uint64_t addB = getAddend<ELFT>(*rbi); in constantEq() 315 template <class ELFT> 316 bool ICF<ELFT>::equalsConstant(const InputSection *a, const InputSection *b) { in equalsConstant() 326 const RelsOrRelas<ELFT> ra = a->template relsOrRelas<ELFT>(); in equalsConstant() [all …]
|
| H A D | InputFiles.cpp | 303 template <class ELFT> static void doParseFile(Ctx &ctx, InputFile *file) { in doParseFile() 313 cast<ObjFile<ELFT>>(file)->parseLazy(); in doParseFile() 323 cast<ObjFile<ELFT>>(file)->parse(); in doParseFile() 325 f->parse<ELFT>(); in doParseFile() 347 template <class ELFT> 356 doParseFile<ELFT>(ctx, files[i].get()); in doParseFiles() 359 cast<ObjFile<ELFT>>(*ctx.driver.armCmseImpLib).importCmseSymbols(); in doParseFiles() 403 template <class ELFT> 405 ArrayRef<typename ELFT::Word> entries) { in handleSectionGroup() 439 template <class ELFT> void ObjFile<ELFT>::initDwarf() { in initDwarf() [all …]
|
| H A D | InputSection.cpp | 46 template <class ELFT> 47 static ArrayRef<uint8_t> getSectionContents(ObjFile<ELFT> &file, in getSectionContents() 48 const typename ELFT::Shdr &hdr) { in getSectionContents() 96 template <class ELFT> 97 InputSectionBase::InputSectionBase(ObjFile<ELFT> &file, in InputSectionBase() 98 const typename ELFT::Shdr &hdr, in InputSectionBase() 119 template <class ELFT> 122 auto *hdr = reinterpret_cast<const typename ELFT::Chdr *>(sec.content_); in decompressAux() 124 .slice(sizeof(typename ELFT::Chdr)); in decompressAux() 139 template <class ELFT> [all …]
|
| H A D | SyntheticSections.cpp | 96 template <class ELFT> 97 MipsAbiFlagsSection<ELFT>::MipsAbiFlagsSection(Ctx &ctx, in MipsAbiFlagsSection() 104 template <class ELFT> void MipsAbiFlagsSection<ELFT>::writeTo(uint8_t *buf) { in writeTo() 108 template <class ELFT> 109 std::unique_ptr<MipsAbiFlagsSection<ELFT>> 110 MipsAbiFlagsSection<ELFT>::create(Ctx &ctx) { in create() 153 return std::make_unique<MipsAbiFlagsSection<ELFT>>(ctx, flags); in create() 158 template <class ELFT> 159 MipsOptionsSection<ELFT>::MipsOptionsSection(Ctx &ctx, Elf_Mips_RegInfo reginfo) in MipsOptionsSection() 165 template <class ELFT> void MipsOptionsSection<ELFT>::writeTo(uint8_t *buf) { in writeTo() [all …]
|
| H A D | Writer.cpp | 49 template <class ELFT> class Writer { 51 LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) 99 template <class ELFT> void elf::writeResult(Ctx &ctx) { in writeResult() 100 Writer<ELFT>(ctx).run(); in writeResult() 318 template <class ELFT> void Writer<ELFT>::run() { in run() 330 sec->maybeCompress<ELFT>(ctx); in run() 394 writeARMCmseImportLib<ELFT>(ctx); in run() 398 template <class ELFT, class RelTy> 399 static void markUsedLocalSymbolsImpl(ObjFile<ELFT> *file, in markUsedLocalSymbolsImpl() 410 template <class ELFT> static void markUsedLocalSymbols(Ctx &ctx) { in markUsedLocalSymbols() [all …]
|
| H A D | SyntheticSections.h | 73 template <class ELFT> 83 template <class ELFT, class RelTy> 85 template <class ELFT> void addSectionAux(EhInputSection *s); 86 template <class ELFT, class RelTy> 91 template <class ELFT, class RelTy> 94 template <class ELFT, class RelTy> 492 template <class ELFT> class DynamicSection final : public SyntheticSection { 493 LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) 577 template <class ELFT> 579 using Elf_Rel = typename ELFT::Rel; [all …]
|
| H A D | Relocations.h | 158 template <class ELFT> void scanRelocations(Ctx &ctx); 159 template <class ELFT> void checkNoCrossRefs(Ctx &ctx); 332 template <class ELFT> 333 static inline int64_t getAddend(const typename ELFT::Rel &rel) { 336 template <class ELFT> 337 static inline int64_t getAddend(const typename ELFT::Rela &rel) { 340 template <class ELFT> 341 static inline int64_t getAddend(const typename ELFT::Crel &rel) {
|
| /freebsd/contrib/llvm-project/llvm/lib/ObjectYAML/ |
| H A D | ELFEmitter.cpp | 181 template <class ELFT> class ELFState { 182 LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) 244 ArrayRef<typename ELFT::Shdr> SHeaders); 342 template <class ELFT> 343 ELFState<ELFT>::ELFState(ELFYAML::Object &D, yaml::ErrorHandler EH) in ELFState() 460 template <class ELFT> 461 void ELFState<ELFT>::writeELFHeader(raw_ostream &OS) { in writeELFHeader() 470 Header.e_ident[EI_CLASS] = ELFT::Is64Bits ? ELFCLASS64 : ELFCLASS32; in writeELFHeader() 537 template <class ELFT> 538 void ELFState<ELFT>::initProgramHeaders(std::vector<Elf_Phdr> &PHeaders) { in initProgramHeaders() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Object/ |
| H A D | ELF.cpp | 334 template <class ELFT> 335 std::vector<typename ELFT::Rel> 336 ELFFile<ELFT>::decode_relrs(Elf_Relr_Range relrs) const { in decode_relrs() 373 using Addr = typename ELFT::uint; in decode_relrs() 377 typename ELFT::uint Entry = R; in decode_relrs() 398 template <class ELFT> 400 ELFFile<ELFT>::getCrelHeader(ArrayRef<uint8_t> Content) const { in getCrelHeader() 401 DataExtractor Data(Content, isLE(), sizeof(typename ELFT::Addr)); in getCrelHeader() 410 template <class ELFT> 411 Expected<typename ELFFile<ELFT>::RelsOrRelas> [all …]
|
| /freebsd/contrib/llvm-project/lld/ELF/Arch/ |
| H A D | Mips.cpp | 22 template <class ELFT> class MIPS final : public TargetInfo { 43 template <class ELFT> MIPS<ELFT>::MIPS(Ctx &ctx) : TargetInfo(ctx) { in MIPS() 55 if (ELFT::Is64Bits) { in MIPS() 70 template <class ELFT> uint32_t MIPS<ELFT>::calcEFlags() const { in calcEFlags() 71 return calcMipsEFlags<ELFT>(ctx); in calcEFlags() 74 template <class ELFT> 75 RelExpr MIPS<ELFT>::getRelExpr(RelType type, const Symbol &s, in getRelExpr() 78 if (ELFT::Is64Bits || ctx.arg.mipsN32Abi) in getRelExpr() 198 template <class ELFT> RelType MIPS<ELFT>::getDynRel(RelType type) const { in getDynRel() 204 template <class ELFT> [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/ExecutionEngine/JITLink/ |
| H A D | ELFLinkGraphBuilder.h | 56 template <typename ELFT> 58 using ELFFile = object::ELFFile<ELFT>; 61 ELFLinkGraphBuilder(const object::ELFFile<ELFT> &Obj, 108 getSymbolLinkageAndScope(const typename ELFT::Sym &Sym, StringRef Name); 111 virtual TargetFlagsType makeTargetFlags(const typename ELFT::Sym &Sym) { in makeTargetFlags() 116 virtual orc::ExecutorAddrDiff getRawOffset(const typename ELFT::Sym &Sym, in getRawOffset() 127 virtual bool excludeSection(const typename ELFT::Shdr &Sect) const { in excludeSection() 137 Error forEachRelaRelocation(const typename ELFT::Shdr &RelSect, 146 Error forEachRelRelocation(const typename ELFT::Shdr &RelSect, 153 Error forEachRelaRelocation(const typename ELFT::Shdr &RelSect, in forEachRelaRelocation() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/ObjCopy/ELF/ |
| H A D | ELFObject.cpp | 36 template <class ELFT> void ELFWriter<ELFT>::writePhdr(const Segment &Seg) { in writePhdr() 66 template <class ELFT> void ELFWriter<ELFT>::writeShdr(const SectionBase &Sec) { in writeShdr() 82 template <class ELFT> Error ELFSectionSizer<ELFT>::visit(Section &) { in visit() 86 template <class ELFT> Error ELFSectionSizer<ELFT>::visit(OwnedDataSection &) { in visit() 90 template <class ELFT> Error ELFSectionSizer<ELFT>::visit(StringTableSection &) { in visit() 94 template <class ELFT> 95 Error ELFSectionSizer<ELFT>::visit(DynamicRelocationSection &) { in visit() 99 template <class ELFT> 100 Error ELFSectionSizer<ELFT>::visit(SymbolTableSection &Sec) { in visit() 104 Sec.Align = ELFT::Is64Bits ? sizeof(Elf_Xword) : sizeof(Elf_Word); in visit() [all …]
|
| H A D | ELFObject.h | 129 template <class ELFT> class ELFSectionWriter : public SectionWriter { 131 using Elf_Word = typename ELFT::Word; 132 using Elf_Rel = typename ELFT::Rel; 133 using Elf_Rela = typename ELFT::Rela; 134 using Elf_Sym = typename ELFT::Sym; 149 template <class ELFT> class ELFSectionSizer : public MutableSectionVisitor { 151 using Elf_Rel = typename ELFT::Rel; 152 using Elf_Rela = typename ELFT::Rela; 153 using Elf_Sym = typename ELFT::Sym; 154 using Elf_Word = typename ELFT::Word; [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/ |
| H A D | DebugObjectManagerPlugin.cpp | 46 template <typename ELFT> 51 ELFDebugObjectSection(const typename ELFT::Shdr *Header) in ELFDebugObjectSection() 52 : Header(const_cast<typename ELFT::Shdr *>(Header)) {} in ELFDebugObjectSection() 60 typename ELFT::Shdr *Header; 63 template <typename ELFT> 64 void ELFDebugObjectSection<ELFT>::setTargetMemoryRange(SectionRange Range) { in setTargetMemoryRange() 67 static_cast<typename ELFT::uint>(Range.getStart().getValue()); in setTargetMemoryRange() 70 template <typename ELFT> 71 Error ELFDebugObjectSection<ELFT>::validateInBounds(StringRef Buffer, in validateInBounds() 76 if (HeaderPtr < Start || HeaderPtr + sizeof(typename ELFT::Shdr) > End) in validateInBounds() [all …]
|