Home
last modified time | relevance | path

Searched refs:ELFT (Results 1 – 25 of 51) sorted by relevance

123

/freebsd/contrib/llvm-project/llvm/include/llvm/Object/
H A DELFTypes.h29 template <class ELFT> struct Elf_Ehdr_Impl;
30 template <class ELFT> struct Elf_Shdr_Impl;
31 template <class ELFT> struct Elf_Sym_Impl;
32 template <class ELFT> struct Elf_Dyn_Impl;
33 template <class ELFT> struct Elf_Phdr_Impl;
34 template <class ELFT, bool isRela> struct Elf_Rel_Impl;
36 template <class ELFT> struct Elf_Verdef_Impl;
37 template <class ELFT> struct Elf_Verdaux_Impl;
38 template <class ELFT> struct Elf_Verneed_Impl;
39 template <class ELFT> struct Elf_Vernaux_Impl;
[all …]
H A DELFObjectFile.h265 template <class ELFT> class ELFObjectFile : public ELFObjectFileBase {
272 LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) in LLVM_ELF_IMPORT_TYPES_ELFT() argument
285 ELFObjectFile(MemoryBufferRef Object, ELFFile<ELFT> EF,
292 ELFFile<ELFT> EF;
437 if (Error E = Attributes.parse(Contents, ELFT::Endianness)) in getBuildAttributes()
450 ELFObjectFile(ELFObjectFile<ELFT> &&Other);
451 static Expected<ELFObjectFile<ELFT>> create(MemoryBufferRef Object,
496 const ELFFile<ELFT> &getELFFile() const { return EF; } in getELFFile()
501 getELFType(ELFT::Endianness == llvm::endianness::little, in classof()
502 ELFT::Is64Bits); in classof()
[all …]
H A DELF.h97 template <class ELFT> class ELFFile;
129 template <class ELFT>
130 std::string getSecIndexForError(const ELFFile<ELFT> &Obj, in getSecIndexForError()
131 const typename ELFT::Shdr &Sec) { in getSecIndexForError()
143 template <class ELFT>
144 static std::string describe(const ELFFile<ELFT> &Obj, in describe()
145 const typename ELFT::Shdr &Sec) { in describe()
153 template <class ELFT>
154 std::string getPhdrIndexForError(const ELFFile<ELFT> &Obj, in getPhdrIndexForError()
155 const typename ELFT::Phdr &Phdr) { in getPhdrIndexForError()
[all …]
/freebsd/contrib/llvm-project/llvm/tools/llvm-objdump/
H A DELFDump.cpp28 template <typename ELFT> class ELFDumper : public Dumper {
30 ELFDumper(const ELFObjectFile<ELFT> &O) : Dumper(O), Obj(O) {} in ELFDumper()
35 const ELFObjectFile<ELFT> &Obj;
37 const ELFFile<ELFT> &getELFFile() const { return Obj.getELFFile(); } in getELFFile()
41 void printSymbolVersionDependency(const typename ELFT::Shdr &Sec);
45 template <class ELFT>
46 static std::unique_ptr<Dumper> createDumper(const ELFObjectFile<ELFT> &Obj) { in createDumper()
47 return std::make_unique<ELFDumper<ELFT>>(Obj); in createDumper()
61 template <class ELFT>
62 static Expected<StringRef> getDynamicStrTab(const ELFFile<ELFT> &Elf) { in getDynamicStrTab()
[all …]
/freebsd/contrib/llvm-project/llvm/tools/llvm-readobj/
H A DELFDumper.cpp93 template <class ELFT> struct RelSymbol {
94 RelSymbol(const typename ELFT::Sym *S, StringRef N) in RelSymbol()
96 const typename ELFT::Sym *Sym;
192 template <class ELFT> class Relocation {
194 Relocation(const typename ELFT::Rel &R, bool IsMips64EL) in Relocation()
198 Relocation(const typename ELFT::Rela &R, bool IsMips64EL) in Relocation()
199 : Relocation((const typename ELFT::Rel &)R, IsMips64EL) { in Relocation()
205 typename ELFT::uint Offset;
206 typename ELFT::uint Info;
210 template <class ELFT> class MipsGOTParser;
[all …]
H A DDwarfCFIEHPrinter.h31 template <typename ELFT> class PrinterContext {
32 using Elf_Shdr = typename ELFT::Shdr;
33 using Elf_Phdr = typename ELFT::Phdr;
36 const object::ELFObjectFile<ELFT> &ObjF;
42 PrinterContext(ScopedPrinter &W, const object::ELFObjectFile<ELFT> &ObjF) in PrinterContext()
48 template <class ELFT>
49 static const typename ELFT::Shdr *
50 findSectionByAddress(const object::ELFObjectFile<ELFT> &ObjF, uint64_t Addr) { in findSectionByAddress()
51 Expected<typename ELFT::ShdrRange> SectionsOrErr = in findSectionByAddress()
56 for (const typename ELFT::Shdr &Shdr : *SectionsOrErr) in findSectionByAddress()
[all …]
/freebsd/contrib/llvm-project/lld/ELF/
H A DMarkLive.cpp45 template <class ELFT> class MarkLive {
75 template <class ELFT>
77 const typename ELFT::Rel &rel) { in getAddend()
82 template <class ELFT>
84 const typename ELFT::Rela &rel) { in getAddend()
89 template <class ELFT>
91 const typename ELFT::Crel &rel) { in getAddend()
95 template <class ELFT>
97 void MarkLive<ELFT>::resolveReloc(InputSectionBase &sec, RelTy &rel, in resolveReloc()
110 offset += getAddend<ELFT>(sec, rel); in resolveReloc()
[all …]
H A DDWARF.cpp28 template <class ELFT> LLDDwarfObj<ELFT>::LLDDwarfObj(ObjFile<ELFT> *obj) { in LLDDwarfObj()
30 ArrayRef<typename ELFT::Shdr> objSections = obj->template getELFShdrs<ELFT>(); in LLDDwarfObj()
90 template <class ELFT> struct LLDRelocationResolver<Elf_Rel_Impl<ELFT, false>> {
103 template <class ELFT>
106 LLDDwarfObj<ELFT>::findAux(const InputSectionBase &sec, uint64_t pos, in findAux()
114 const ObjFile<ELFT> *file = sec.getFile<ELFT>(); in findAux()
116 const typename ELFT::Sym &sym = file->template getELFSyms<ELFT>()[symIndex]; in findAux()
129 d.p = getAddend<ELFT>(rel); in findAux()
135 template <class ELFT>
137 LLDDwarfObj<ELFT>::find(const llvm::DWARFSection &s, uint64_t pos) const { in find()
[all …]
H A DInputSection.h33 template <class ELFT> class ObjFile;
39 template <class ELFT> struct RelsOrRelas {
40 Relocs<typename ELFT::Rel> rels;
41 Relocs<typename ELFT::Rela> relas;
42 Relocs<typename ELFT::Crel> crels;
49 const RelsOrRelas<ELFT> rs = (sec).template relsOrRelas<ELFT>(); \
142 template <class ELFT>
143 InputSectionBase(ObjFile<ELFT> &file, const typename ELFT::Shdr &header,
168 template <class ELFT> ObjFile<ELFT> *getFile() const { in getFile()
169 return cast<ObjFile<ELFT>>(file); in getFile()
[all …]
H A DInputFiles.h188 template <typename ELFT> llvm::object::ELFFile<ELFT> getObj() const { in getObj()
189 return check(llvm::object::ELFFile<ELFT>::create(mb.getBuffer())); in getObj()
208 template <typename ELFT> typename ELFT::ShdrRange getELFShdrs() const { in getELFShdrs()
209 return typename ELFT::ShdrRange( in getELFShdrs()
210 reinterpret_cast<const typename ELFT::Shdr *>(elfShdrs), numELFShdrs); in getELFShdrs()
212 template <typename ELFT> typename ELFT::SymRange getELFSyms() const { in getELFSyms()
213 return typename ELFT::SymRange( in getELFSyms()
214 reinterpret_cast<const typename ELFT::Sym *>(elfSyms), numELFSyms); in getELFSyms()
216 template <typename ELFT> typename ELFT::SymRange getGlobalELFSyms() const { in getGlobalELFSyms()
217 return getELFSyms<ELFT>().slice(firstGlobal); in getGlobalELFSyms()
[all …]
H A DICF.cpp98 template <class ELFT> class ICF {
197 template <class ELFT>
198 void ICF<ELFT>::segregate(size_t begin, size_t end, uint32_t eqClassBase, in segregate()
236 template <class ELFT>
238 bool ICF<ELFT>::constantEq(const InputSection *secA, Relocs<RelTy> ra, in constantEq()
248 uint64_t addA = getAddend<ELFT>(*rai); in constantEq()
249 uint64_t addB = getAddend<ELFT>(*rbi); in constantEq()
314 template <class ELFT>
315 bool ICF<ELFT>::equalsConstant(const InputSection *a, const InputSection *b) { in equalsConstant()
325 const RelsOrRelas<ELFT> ra = a->template relsOrRelas<ELFT>(); in equalsConstant()
[all …]
H A DInputSection.cpp44 template <class ELFT>
45 static ArrayRef<uint8_t> getSectionContents(ObjFile<ELFT> &file, in getSectionContents()
46 const typename ELFT::Shdr &hdr) { in getSectionContents()
89 template <class ELFT>
90 InputSectionBase::InputSectionBase(ObjFile<ELFT> &file, in InputSectionBase()
91 const typename ELFT::Shdr &hdr, in InputSectionBase()
110 template <class ELFT>
113 auto *hdr = reinterpret_cast<const typename ELFT::Chdr *>(sec.content_); in decompressAux()
115 .slice(sizeof(typename ELFT::Chdr)); in decompressAux()
136 template <class ELFT>
[all …]
H A DInputFiles.cpp302 template <class ELFT> static void doParseFile(InputFile *file) { in doParseFile()
312 cast<ObjFile<ELFT>>(file)->parseLazy(); in doParseFile()
322 cast<ObjFile<ELFT>>(file)->parse(); in doParseFile()
324 f->parse<ELFT>(); in doParseFile()
344 template <class ELFT>
352 doParseFile<ELFT>(files[i]); in doParseFiles()
355 cast<ObjFile<ELFT>>(*armCmseImpLib).importCmseSymbols(); in doParseFiles()
373 template <class ELFT>
374 static std::string getSrcMsgAux(ObjFile<ELFT> &file, const Symbol &sym, in getSrcMsgAux()
441 template <class ELFT>
[all …]
H A DSyntheticSections.cpp98 template <class ELFT>
99 MipsAbiFlagsSection<ELFT>::MipsAbiFlagsSection(Elf_Mips_ABIFlags flags) in MipsAbiFlagsSection()
105 template <class ELFT> void MipsAbiFlagsSection<ELFT>::writeTo(uint8_t *buf) { in writeTo()
109 template <class ELFT>
110 std::unique_ptr<MipsAbiFlagsSection<ELFT>> MipsAbiFlagsSection<ELFT>::create() { in create()
153 return std::make_unique<MipsAbiFlagsSection<ELFT>>(flags); in create()
158 template <class ELFT>
159 MipsOptionsSection<ELFT>::MipsOptionsSection(Elf_Mips_RegInfo reginfo) in MipsOptionsSection()
165 template <class ELFT> void MipsOptionsSection<ELFT>::writeTo(uint8_t *buf) { in writeTo()
175 template <class ELFT>
[all …]
H A DWriter.cpp48 template <class ELFT> class Writer {
50 LLVM_ELF_IMPORT_TYPES_ELFT(ELFT)
94 template <class ELFT> void elf::writeResult() { in writeResult()
95 Writer<ELFT>().run(); in writeResult()
304 template <class ELFT> void Writer<ELFT>::run() { in run()
315 sec->maybeCompress<ELFT>(); in run()
377 writeARMCmseImportLib<ELFT>(); in run()
381 template <class ELFT, class RelTy>
382 static void markUsedLocalSymbolsImpl(ObjFile<ELFT> *file, in markUsedLocalSymbolsImpl()
393 template <class ELFT> static void markUsedLocalSymbols() { in markUsedLocalSymbols()
[all …]
H A DSyntheticSections.h73 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>
482 template <class ELFT> class DynamicSection final : public SyntheticSection {
483 LLVM_ELF_IMPORT_TYPES_ELFT(ELFT)
572 template <class ELFT>
574 using Elf_Rel = typename ELFT::Rel;
[all …]
/freebsd/contrib/llvm-project/llvm/lib/InterfaceStub/
H A DELFObjHandler.cpp51 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/llvm/lib/ObjectYAML/
H A DELFEmitter.cpp184 template <class ELFT> class ELFState {
185 LLVM_ELF_IMPORT_TYPES_ELFT(ELFT)
247 ArrayRef<typename ELFT::Shdr> SHeaders);
345 template <class ELFT>
346 ELFState<ELFT>::ELFState(ELFYAML::Object &D, yaml::ErrorHandler EH) in ELFState()
463 template <class ELFT>
464 void ELFState<ELFT>::writeELFHeader(raw_ostream &OS) { in writeELFHeader()
473 Header.e_ident[EI_CLASS] = ELFT::Is64Bits ? ELFCLASS64 : ELFCLASS32; in writeELFHeader()
540 template <class ELFT>
541 void ELFState<ELFT>::initProgramHeaders(std::vector<Elf_Phdr> &PHeaders) { in initProgramHeaders()
[all …]
/freebsd/contrib/llvm-project/lld/ELF/Arch/
H A DMips.cpp24 template <class ELFT> class MIPS final : public TargetInfo {
45 template <class ELFT> MIPS<ELFT>::MIPS() { in MIPS()
57 if (ELFT::Is64Bits) { in MIPS()
72 template <class ELFT> uint32_t MIPS<ELFT>::calcEFlags() const { in calcEFlags()
73 return calcMipsEFlags<ELFT>(); in calcEFlags()
76 template <class ELFT>
77 RelExpr MIPS<ELFT>::getRelExpr(RelType type, const Symbol &s, in getRelExpr()
80 if (ELFT::Is64Bits || config->mipsN32Abi) in getRelExpr()
200 template <class ELFT> RelType MIPS<ELFT>::getDynRel(RelType type) const { in getDynRel()
206 template <class ELFT>
[all …]
/freebsd/contrib/llvm-project/llvm/lib/ExecutionEngine/JITLink/
H A DELFLinkGraphBuilder.h56 template <typename ELFT>
58 using ELFFile = object::ELFFile<ELFT>;
61 ELFLinkGraphBuilder(const object::ELFFile<ELFT> &Obj, Triple TT,
107 getSymbolLinkageAndScope(const typename ELFT::Sym &Sym, StringRef Name);
110 virtual TargetFlagsType makeTargetFlags(const typename ELFT::Sym &Sym) { in makeTargetFlags()
115 virtual orc::ExecutorAddrDiff getRawOffset(const typename ELFT::Sym &Sym, in getRawOffset()
126 virtual bool excludeSection(const typename ELFT::Shdr &Sect) const { in excludeSection()
136 Error forEachRelaRelocation(const typename ELFT::Shdr &RelSect,
145 Error forEachRelRelocation(const typename ELFT::Shdr &RelSect,
152 Error forEachRelaRelocation(const typename ELFT::Shdr &RelSect, in forEachRelaRelocation()
[all …]
H A DELF_loongarch.cpp48 template <typename ELFT>
49 class ELFLinkGraphBuilder_loongarch : public ELFLinkGraphBuilder<ELFT> {
81 using Base = ELFLinkGraphBuilder<ELFT>; in addRelocations()
82 using Self = ELFLinkGraphBuilder_loongarch<ELFT>; in addRelocations()
91 Error addSingleRelocation(const typename ELFT::Rela &Rel, in addSingleRelocation()
92 const typename ELFT::Shdr &FixupSect, in addSingleRelocation()
94 using Base = ELFLinkGraphBuilder<ELFT>; in addSingleRelocation()
132 const object::ELFFile<ELFT> &Obj, Triple TT, in ELFLinkGraphBuilder_loongarch()
134 : ELFLinkGraphBuilder<ELFT>(Obj, std::move(TT), std::move(Features), in ELFLinkGraphBuilder_loongarch()
H A DELF_i386.cpp112 template <typename ELFT>
113 class ELFLinkGraphBuilder_i386 : public ELFLinkGraphBuilder<ELFT> {
144 using Base = ELFLinkGraphBuilder<ELFT>; in addRelocations()
162 Error addSingleRelocation(const typename ELFT::Rel &Rel, in addSingleRelocation()
163 const typename ELFT::Shdr &FixupSection, in addSingleRelocation()
165 using Base = ELFLinkGraphBuilder<ELFT>; in addSingleRelocation()
212 ELFLinkGraphBuilder_i386(StringRef FileName, const object::ELFFile<ELFT> &Obj, in ELFLinkGraphBuilder_i386()
214 : ELFLinkGraphBuilder<ELFT>(Obj, std::move(TT), std::move(Features), in ELFLinkGraphBuilder_i386()
/freebsd/contrib/llvm-project/llvm/lib/Object/
H A DELF.cpp332 template <class ELFT>
333 std::vector<typename ELFT::Rel>
334 ELFFile<ELFT>::decode_relrs(Elf_Relr_Range relrs) const { in decode_relrs()
371 using Addr = typename ELFT::uint; in decode_relrs()
375 typename ELFT::uint Entry = R; in decode_relrs()
396 template <class ELFT>
398 ELFFile<ELFT>::getCrelHeader(ArrayRef<uint8_t> Content) const { in getCrelHeader()
399 DataExtractor Data(Content, isLE(), sizeof(typename ELFT::Addr)); in getCrelHeader()
408 template <class ELFT>
409 Expected<typename ELFFile<ELFT>::RelsOrRelas>
[all …]
/freebsd/contrib/llvm-project/llvm/lib/ObjCopy/ELF/
H A DELFObject.cpp39 template <class ELFT> void ELFWriter<ELFT>::writePhdr(const Segment &Seg) { in writePhdr()
69 template <class ELFT> void ELFWriter<ELFT>::writeShdr(const SectionBase &Sec) { in writeShdr()
85 template <class ELFT> Error ELFSectionSizer<ELFT>::visit(Section &) { in visit()
89 template <class ELFT> Error ELFSectionSizer<ELFT>::visit(OwnedDataSection &) { in visit()
93 template <class ELFT> Error ELFSectionSizer<ELFT>::visit(StringTableSection &) { in visit()
97 template <class ELFT>
98 Error ELFSectionSizer<ELFT>::visit(DynamicRelocationSection &) { in visit()
102 template <class ELFT>
103 Error ELFSectionSizer<ELFT>::visit(SymbolTableSection &Sec) { in visit()
107 Sec.Align = ELFT::Is64Bits ? sizeof(Elf_Xword) : sizeof(Elf_Word); in visit()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/ExecutionEngine/Orc/
H A DDebugObjectManagerPlugin.cpp48 template <typename ELFT>
53 ELFDebugObjectSection(const typename ELFT::Shdr *Header) in ELFDebugObjectSection()
54 : Header(const_cast<typename ELFT::Shdr *>(Header)) {} in ELFDebugObjectSection()
62 typename ELFT::Shdr *Header;
65 template <typename ELFT>
66 void ELFDebugObjectSection<ELFT>::setTargetMemoryRange(SectionRange Range) { in setTargetMemoryRange()
69 static_cast<typename ELFT::uint>(Range.getStart().getValue()); in setTargetMemoryRange()
72 template <typename ELFT>
73 Error ELFDebugObjectSection<ELFT>::validateInBounds(StringRef Buffer, in validateInBounds()
78 if (HeaderPtr < Start || HeaderPtr + sizeof(typename ELFT::Shdr) > End) in validateInBounds()
[all …]

123