Home
last modified time | relevance | path

Searched refs:Elf_Shdr (Results 1 – 25 of 37) sorted by relevance

12

/freebsd/contrib/llvm-project/llvm/include/llvm/Object/
H A DELF.h272 std::vector<Elf_Shdr> FakeSections;
285 Expected<const T *> getEntry(const Elf_Shdr &Section, uint32_t Entry) const;
288 getVersionDefinitions(const Elf_Shdr &Sec) const;
290 const Elf_Shdr &Sec,
298 getStringTable(const Elf_Shdr &Section,
300 Expected<StringRef> getStringTableForSymtab(const Elf_Shdr &Section) const;
301 Expected<StringRef> getStringTableForSymtab(const Elf_Shdr &Section,
305 Expected<ArrayRef<Elf_Word>> getSHNDXTable(const Elf_Shdr &Section) const;
306 Expected<ArrayRef<Elf_Word>> getSHNDXTable(const Elf_Shdr &Section,
321 const Elf_Shdr *SymTab) const;
[all …]
H A DELFObjectFile.h274 SectionRef toSectionRef(const Elf_Shdr *Sec) const { in LLVM_ELF_IMPORT_TYPES_ELFT()
278 ELFSymbolRef toSymbolRef(const Elf_Shdr *SymTable, unsigned SymbolNum) const { in toSymbolRef()
286 const Elf_Shdr *DotDynSymSec, const Elf_Shdr *DotSymtabSec,
287 const Elf_Shdr *DotSymtabShndxSec);
294 const Elf_Shdr *DotDynSymSec = nullptr; // Dynamic symbol table section.
295 const Elf_Shdr *DotSymtabSec = nullptr; // Symbol table section.
296 const Elf_Shdr *DotSymtabShndxSec = nullptr; // SHT_SYMTAB_SHNDX section.
316 const Elf_Shdr *SymTab) const;
353 DataRefImpl toDRI(const Elf_Shdr *SymTable, unsigned SymbolNum) const { in toDRI()
371 (reinterpret_cast<uintptr_t>(SymTable) - SHT) / sizeof(Elf_Shdr); in toDRI()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/ObjectYAML/
H A DELFEmitter.cpp228 bool initImplicitHeader(ContiguousBlobAccumulator &CBA, Elf_Shdr &Header,
230 void initSectionHeaders(std::vector<Elf_Shdr> &SHeaders,
232 void initSymtabSectionHeader(Elf_Shdr &SHeader, SymtabType STType,
235 void initStrtabSectionHeader(Elf_Shdr &SHeader, StringRef Name,
239 void initDWARFSectionHeader(Elf_Shdr &SHeader, StringRef Name,
243 std::vector<Elf_Shdr> &SHeaders);
251 void writeSectionContent(Elf_Shdr &SHeader,
254 void writeSectionContent(Elf_Shdr &SHeader,
257 void writeSectionContent(Elf_Shdr &SHeader,
260 void writeSectionContent(Elf_Shdr &SHeader,
[all …]
/freebsd/usr.bin/gprof/
H A Delf.c61 const Elf_Shdr *shdrs; in elf_getnfile()
62 const Elf_Shdr *sh_symtab; in elf_getnfile()
63 const Elf_Shdr *sh_strtab; in elf_getnfile()
83 shdrs = (const Elf_Shdr *)(base + h.e_shoff); in elf_getnfile()
/freebsd/contrib/llvm-project/llvm/tools/llvm-readobj/
H A DELFDumper.cpp238 std::string describe(const Elf_Shdr &Sec) const;
273 const Elf_Shdr *findSectionByName(StringRef Name) const;
278 virtual void printVersionSymbolSection(const Elf_Shdr *Sec) = 0;
279 virtual void printVersionDefinitionSection(const Elf_Shdr *Sec) = 0;
280 virtual void printVersionDependencySection(const Elf_Shdr *Sec) = 0;
283 printDependentLibsHelper(function_ref<void(const Elf_Shdr &)> OnSectionStart,
291 const Elf_Shdr &Sec, const Elf_Shdr *SymTab);
294 void printRelocationsHelper(const Elf_Shdr &Sec);
296 const Elf_Shdr &Sec,
298 const Elf_Shdr &, const Elf_Shdr *)>
[all …]
H A DARMEHABIPrinter.h325 typedef typename ET::Shdr Elf_Shdr; typedef
332 const Elf_Shdr *Symtab;
347 const Elf_Shdr *FindExceptionTable(unsigned IndexTableIndex,
350 void PrintIndexTable(unsigned SectionIndex, const Elf_Shdr *IT) const;
351 void PrintExceptionTable(const Elf_Shdr &EHT,
357 StringRef FileName, const Elf_Shdr *Symtab) in PrinterContext()
406 for (const Elf_Shdr &Sec : unwrapOrError(FileName, ELF.sections())) { in FindExceptionTable()
413 const Elf_Shdr *SymTab = *SymTabOrErr; in FindExceptionTable()
447 void PrinterContext<ET>::PrintExceptionTable(const Elf_Shdr &EHT, in PrintExceptionTable()
520 const Elf_Shdr *IT) const { in PrintIndexTable()
[all …]
H A DDwarfCFIEHPrinter.h32 using Elf_Shdr = typename ELFT::Shdr; variable
39 void printEHFrame(const Elf_Shdr *EHFrameShdr) const;
86 for (const Elf_Shdr &Shdr : *SectionsOrErr) { in printUnwindInformation()
104 if (const Elf_Shdr *EHFrameHdr = in printEHFrameHdr()
173 void PrinterContext<ELFT>::printEHFrame(const Elf_Shdr *EHFrameShdr) const { in printEHFrame()
/freebsd/lib/libc/gen/
H A Dnlist.c88 static void elf_sym_to_nlist(struct nlist *, Elf_Sym *, Elf_Shdr *, int);
133 Elf_Shdr *shdr = NULL; in __elf_fdnlist()
159 shdr = (Elf_Shdr *)base; in __elf_fdnlist()
261 elf_sym_to_nlist(struct nlist *nl, Elf_Sym *s, Elf_Shdr *shdr, int shnum) in elf_sym_to_nlist()
278 Elf_Shdr *sh = shdr + s->st_shndx; in elf_sym_to_nlist()
/freebsd/contrib/llvm-project/llvm/lib/Object/
H A DELF.cpp441 ELFFile<ELFT>::crels(const Elf_Shdr &Sec) const { in crels()
450 ELFFile<ELFT>::android_relas(const Elf_Shdr &Sec) const { in android_relas()
633 for (const Elf_Shdr &Sec : *SectionsOrError) { in dynamicEntries()
735 const typename ELFFile<ELFT>::Elf_Shdr &Sec, in decodeBBAddrMapImpl()
736 const typename ELFFile<ELFT>::Elf_Shdr *RelaSec, in decodeBBAddrMapImpl()
928 ELFFile<ELFT>::decodeBBAddrMap(const Elf_Shdr &Sec, const Elf_Shdr *RelaSec, in decodeBBAddrMap()
942 std::function<Expected<bool>(const Elf_Shdr &)> IsMatch) const { in getSectionAndRelocations()
943 MapVector<const Elf_Shdr *, const Elf_Shdr *> SecToRelocMap; in getSectionAndRelocations()
945 for (const Elf_Shdr &Sec : cantFail(this->sections())) { in getSectionAndRelocations()
952 if (SecToRelocMap.insert(std::make_pair(&Sec, (const Elf_Shdr *)nullptr)) in getSectionAndRelocations()
[all …]
H A DELFObjectFile.cpp882 using Elf_Shdr = typename ELFT::Shdr; in readBBAddrMapImpl() typedef
889 auto IsMatch = [&](const Elf_Shdr &Sec) -> Expected<bool> { in readBBAddrMapImpl()
895 Expected<const Elf_Shdr *> TextSecOrErr = EF.getSection(Sec.sh_link); in readBBAddrMapImpl()
908 Expected<MapVector<const Elf_Shdr *, const Elf_Shdr *>> SectionRelocMapOrErr = in readBBAddrMapImpl()
939 using Elf_Shdr = typename ELFT::Shdr; in readDynsymVersionsImpl() typedef
940 const Elf_Shdr *VerSec = nullptr; in readDynsymVersionsImpl()
941 const Elf_Shdr *VerNeedSec = nullptr; in readDynsymVersionsImpl()
942 const Elf_Shdr *VerDefSec = nullptr; in readDynsymVersionsImpl()
944 for (const Elf_Shdr &Sec : cantFail(EF.sections())) { in readDynsymVersionsImpl()
/freebsd/contrib/llvm-project/lld/ELF/
H A DInputFiles.h256 StringRef getShtGroupSignature(ArrayRef<Elf_Shdr> sections,
257 const Elf_Shdr &sec);
272 const Elf_Shdr *addrsigSec = nullptr;
304 InputSectionBase *createInputSection(uint32_t idx, const Elf_Shdr &sec,
307 bool shouldMerge(const Elf_Shdr &sec, StringRef name);
H A DInputFiles.cpp521 template <typename Elf_Shdr>
522 static const Elf_Shdr *findSection(ArrayRef<Elf_Shdr> sections, uint32_t type) { in findSection()
523 for (const Elf_Shdr &sec : sections) in findSection()
549 using Elf_Shdr = typename ELFT::Shdr; in init() typedef
558 ArrayRef<Elf_Shdr> sections = CHECK(obj.sections(), this); in init()
563 const Elf_Shdr *symtabSec = in init()
599 ArrayRef<Elf_Shdr> objSections = getELFShdrs<ELFT>(); in parse()
604 const Elf_Shdr &sec = objSections[i]; in parse()
701 StringRef ObjFile<ELFT>::getShtGroupSignature(ArrayRef<Elf_Shdr> sections, in getShtGroupSignature()
702 const Elf_Shdr &sec) { in getShtGroupSignature()
[all …]
/freebsd/sys/compat/linux/
H A Dlinux_vdso.c104 const Elf_Shdr *shdr; in __elfN()
116 MPASS(ehdr->e_shentsize == sizeof(Elf_Shdr)); in __elfN()
120 shdr = (const Elf_Shdr *)(base + ehdr->e_shoff); in __elfN()
/freebsd/contrib/llvm-project/llvm/lib/InterfaceStub/
H A DELFObjHandler.cpp76 using Elf_Shdr = typename ELFT::Shdr; typedef
78 Elf_Shdr Shdr;
173 using Elf_Shdr = typename ELFT::Shdr; typedef in llvm::ifs::__anon3dc69c9e0111::ELFStubBuilder
262 return ElfHeader.e_shoff + ElfHeader.e_shnum * sizeof(Elf_Shdr); in getSize()
331 return ElfHeader.e_shoff + Sec.Index * sizeof(Elf_Shdr); in shdrOffset()
357 using Elf_Shdr = typename ELFT::Shdr; typedef in llvm::ifs::__anon3dc69c9e0111::DynSym
391 const Elf_Shdr *findDynSymHdr() { in findDynSymHdr()
392 for (const Elf_Shdr &Sec : Shdrs) in findDynSymHdr()
419 const Elf_Shdr *DynSymHdr;
/freebsd/stand/common/
H A Dload_elf_obj.c53 Elf_Shdr *e_shdr;
143 hdr->e_shentsize != sizeof(Elf_Shdr)) { in __elfN()
227 Elf_Shdr *shdr, *cshdr, *lshdr; in __elfN()
471 Elf_Shdr *shdr; in __elfN()
509 Elf_Shdr *shdr; in __elfN()
H A Dload_elf.c179 static int elf_section_header_convert(const Elf_Ehdr *ehdr, Elf_Shdr *shdr) in elf_section_header_convert()
212 static int elf_section_header_convert(const Elf_Ehdr *ehdr, Elf_Shdr *shdr) in elf_section_header_convert()
535 Elf_Shdr *shdr;
993 Elf_Shdr *sh_meta, *shdr = NULL;
994 Elf_Shdr *sh_data[2];
/freebsd/sys/x86/xen/
H A Dpv.c220 Elf_Shdr *shdr; in xen_pvh_parse_symtab()
232 shdr = (Elf_Shdr *)((uint8_t *)ehdr + ehdr->e_shoff); in xen_pvh_parse_symtab()
/freebsd/usr.sbin/crunch/crunchide/
H A Dexec_elf32.c91 Elf_Shdr *shdr;
226 Elf_Shdr *shdrp = NULL, *symtabshdr, *strtabshdr, *shstrtabshdr; in ELFNAMEEND()
227 Elf_Shdr shdrshdr; in ELFNAMEEND()
/freebsd/sys/kern/
H A Dkern_ctf.c48 Elf_Shdr *shdr = NULL; in link_elf_ctf_get()
127 hdr->e_shentsize != sizeof(Elf_Shdr)) { in link_elf_ctf_get()
/freebsd/usr.bin/gcore/
H A Delfcore.c212 hdrsize += sizeof(Elf_Shdr); in elf_coredump()
471 Elf_Shdr *shdr; in elf_puthdr()
501 ehdr->e_shentsize = sizeof(Elf_Shdr); in elf_puthdr()
513 shdr = (Elf_Shdr *)((char *)hdr + ehdr->e_shoff); in elf_puthdr()
/freebsd/contrib/llvm-project/llvm/lib/ObjCopy/ELF/
H A DELFObject.cpp72 Elf_Shdr &Shdr = *reinterpret_cast<Elf_Shdr *>(B); in writeShdr()
1568 Expected<const Elf_Shdr *> Shdr = ElfFile.getSection(SymTab->Index); in initSymbolTable()
1597 Expected<const Elf_Shdr *> ShndxSec = in initSymbolTable()
1707 Expected<SectionBase &> ELFBuilder<ELFT>::makeSection(const Elf_Shdr &Shdr) { in makeSection()
1794 for (const typename ELFFile<ELFT>::Elf_Shdr &Shdr : *Sections) { in readSectionHeaders()
1830 Expected<const Elf_Shdr *> Sec = ElfFile.getSection(0); in readSections()
1887 const typename ELFFile<ELFT>::Elf_Shdr *Shdr = in readSections()
2048 Ehdr.e_shentsize = sizeof(Elf_Shdr); in writeEhdr()
2087 Elf_Shdr &Shdr = in writeShdrs()
2088 *reinterpret_cast<Elf_Shdr *>(Buf->getBufferStart() + Obj.SHOff); in writeShdrs()
[all …]
/freebsd/sys/dev/ksyms/
H A Dksyms.c104 Elf_Shdr kh_shdr[SHDR_NUM];
298 hdr->kh_ehdr.e_shentsize = sizeof(Elf_Shdr); in ksyms_snapshot()
/freebsd/sys/powerpc/powerpc/
H A Dmachdep.c532 Elf_Shdr *shdr; in load_external_symtab()
587 shdr = (Elf_Shdr *)(kernelimg + ehdr->e_shoff); in load_external_symtab()
/freebsd/sys/arm64/linux/
H A Dlinux_sysvec.c538 const Elf_Shdr *shdr; in linux_vdso_reloc()
548 shdr = (const Elf_Shdr *)(mapping + ehdr->e_shoff); in linux_vdso_reloc()
/freebsd/contrib/llvm-project/llvm/lib/ExecutionEngine/RuntimeDyld/
H A DRuntimeDyldELF.cpp109 Elf_Shdr *shdr = in updateSectionAddress()
110 const_cast<Elf_Shdr *>(reinterpret_cast<const Elf_Shdr *>(ShdrRef.p)); in updateSectionAddress()
144 typedef typename ELFT::Shdr Elf_Shdr; in createRTDyldELFObject() typedef
165 Elf_Shdr *shdr = const_cast<Elf_Shdr *>( in createRTDyldELFObject()
166 reinterpret_cast<const Elf_Shdr *>(ShdrRef.p)); in createRTDyldELFObject()

12