Home
last modified time | relevance | path

Searched refs:Phdr (Results 1 – 25 of 35) sorted by relevance

12

/freebsd/contrib/llvm-project/llvm/include/llvm/Object/
H A DELF.h156 const typename ELFT::Phdr &Phdr) { in getPhdrIndexForError() argument
159 return ("[index " + Twine(&Phdr - &Headers->front()) + "]").str(); in getPhdrIndexForError()
170 static bool checkSectionOffsets(const typename ELFT::Phdr &Phdr, in checkSectionOffsets() argument
176 if (Sec.sh_offset < Phdr.p_offset) in checkSectionOffsets()
181 return (Sec.sh_offset + 1 <= Phdr.p_offset + Phdr.p_filesz); in checkSectionOffsets()
182 return Sec.sh_offset + Sec.sh_size <= Phdr.p_offset + Phdr.p_filesz; in checkSectionOffsets()
188 static bool checkSectionVMA(const typename ELFT::Phdr &Phdr, in checkSectionVMA() argument
193 if (Sec.sh_addr < Phdr.p_vaddr) in checkSectionVMA()
199 bool IsTbssInNonTLS = IsTbss && Phdr.p_type != ELF::PT_TLS; in checkSectionVMA()
202 return Sec.sh_addr + 1 <= Phdr.p_vaddr + Phdr.p_memsz; in checkSectionVMA()
[all …]
H A DELFTypes.h64 using Phdr = Elf_Phdr_Impl<ELFType<E, Is64>>; member
87 using PhdrRange = ArrayRef<Phdr>;
120 using Elf_Phdr = typename ELFT::Phdr; \
/freebsd/contrib/llvm-project/llvm/tools/llvm-objdump/
H A DELFDump.cpp194 for (const typename ELFT::Phdr &Phdr : *PhdrRangeOrErr) in getSectionLMA()
195 if ((Phdr.p_type == ELF::PT_LOAD) && in getSectionLMA()
197 Phdr, *cast<const ELFObjectFile<ELFT>>(Sec.getObject()) in getSectionLMA()
199 return Sec.getAddress() - Phdr.p_vaddr + Phdr.p_paddr; in getSectionLMA()
277 for (const typename ELFT::Phdr &Phdr : *ProgramHeaderOrError) { in printProgramHeaders()
278 switch (Phdr.p_type) { in printProgramHeaders()
333 outs() << "off " << format(Fmt, (uint64_t)Phdr.p_offset) << "vaddr " in printProgramHeaders()
334 << format(Fmt, (uint64_t)Phdr.p_vaddr) << "paddr " in printProgramHeaders()
335 << format(Fmt, (uint64_t)Phdr.p_paddr) in printProgramHeaders()
336 << format("align 2**%u\n", llvm::countr_zero<uint64_t>(Phdr.p_align)) in printProgramHeaders()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Object/
H A DELF.cpp616 for (const Elf_Phdr &Phdr : *ProgramHeadersOrError) { in dynamicEntries()
617 if (Phdr.p_type == ELF::PT_DYNAMIC) { in dynamicEntries()
618 const uint8_t *DynOffset = base() + Phdr.p_offset; in dynamicEntries()
623 Phdr.p_filesz / sizeof(Elf_Dyn)); in dynamicEntries()
668 for (const Elf_Phdr &Phdr : *ProgramHeadersOrError) in toMappedAddr()
669 if (Phdr.p_type == ELF::PT_LOAD) in toMappedAddr()
670 LoadSegments.push_back(const_cast<Elf_Phdr *>(&Phdr)); in toMappedAddr()
684 LoadSegments, VAddr, [](uint64_t VAddr, const Elf_Phdr_Impl<ELFT> *Phdr) { in toMappedAddr() argument
685 return VAddr < Phdr->p_vaddr; in toMappedAddr()
692 const Elf_Phdr &Phdr = **I; in toMappedAddr() local
[all …]
/freebsd/contrib/llvm-project/llvm/tools/llvm-readobj/
H A DDwarfCFIEHPrinter.h34 using Elf_Phdr = typename ELFT::Phdr;
71 for (const Elf_Phdr &Phdr : *PhdrsOrErr) { in printUnwindInformation()
72 if (Phdr.p_type != ELF::PT_GNU_EH_FRAME) in printUnwindInformation()
75 if (Phdr.p_memsz != Phdr.p_filesz) in printUnwindInformation()
79 printEHFrameHdr(&Phdr); in printUnwindInformation()
H A DELFDumper.cpp1826 std::pair<const typename ELFT::Phdr *, const typename ELFT::Shdr *>
1831 for (const Elf_Phdr &Phdr : *PhdrsOrErr) { in findDynamic()
1832 if (Phdr.p_type != ELF::PT_DYNAMIC) in findDynamic()
1834 DynamicPhdr = &Phdr; in findDynamic()
4718 static bool checkTLSSections(const typename ELFT::Phdr &Phdr, in checkTLSSections() argument
4723 return Phdr.p_type == ELF::PT_TLS; in checkTLSSections()
4727 return (Phdr.p_type == ELF::PT_TLS) || (Phdr.p_type == ELF::PT_LOAD) || in checkTLSSections()
4728 (Phdr.p_type == ELF::PT_GNU_RELRO); in checkTLSSections()
4732 return Phdr.p_type != ELF::PT_TLS; in checkTLSSections()
4736 static bool checkPTDynamic(const typename ELFT::Phdr &Phdr, in checkPTDynamic() argument
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/hwasan/
H A Dhwasan_globals.cpp29 static void CheckCodeModel(ElfW(Addr) base, const ElfW(Phdr) * phdr, in CheckCodeModel()
53 const ElfW(Phdr) * phdr, in HwasanGlobalsFor()
H A Dhwasan_globals.h45 const ElfW(Phdr) * phdr,
H A Dhwasan_interface_internal.h30 void __hwasan_library_loaded(ElfW(Addr) base, const ElfW(Phdr) * phdr,
34 void __hwasan_library_unloaded(ElfW(Addr) base, const ElfW(Phdr) * phdr,
H A Dhwasan.cpp347 reinterpret_cast<const ElfW(Phdr) *>( in __hwasan_init_static()
417 void __hwasan_library_loaded(ElfW(Addr) base, const ElfW(Phdr) * phdr, in __hwasan_library_loaded()
423 void __hwasan_library_unloaded(ElfW(Addr) base, const ElfW(Phdr) * phdr, in __hwasan_library_unloaded()
/freebsd/contrib/llvm-project/libc/src/__support/OSUtil/linux/
H A Dvdso.cpp132 static cpp::optional<PhdrInfo> from(ElfW(Phdr) * vdso_phdr, size_t e_phnum, in from()
217 ElfW(Phdr) *vdso_phdr = in initialize_vdso_global_cache()
218 reinterpret_cast<ElfW(Phdr) *>(vdso_ehdr_addr + vdso_ehdr->e_phoff); in initialize_vdso_global_cache()
/freebsd/contrib/llvm-project/llvm/lib/ObjCopy/ELF/
H A DELFObject.cpp39 Elf_Phdr &Phdr = *reinterpret_cast<Elf_Phdr *>(B); in writePhdr() local
40 Phdr.p_type = Seg.Type; in writePhdr()
41 Phdr.p_flags = Seg.Flags; in writePhdr()
42 Phdr.p_offset = Seg.Offset; in writePhdr()
43 Phdr.p_vaddr = Seg.VAddr; in writePhdr()
44 Phdr.p_paddr = Seg.PAddr; in writePhdr()
45 Phdr.p_filesz = Seg.FileSize; in writePhdr()
46 Phdr.p_memsz = Seg.MemSize; in writePhdr()
47 Phdr.p_align = Seg.Align; in writePhdr()
1455 for (const typename ELFFile<ELFT>::Elf_Phdr &Phdr : *Headers) { in readProgramHeaders()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/ProfileData/
H A DMemProfReader.cpp373 for (const auto &Phdr : *PHdrsOr) { in initialize()
374 if (Phdr.p_type == ELF::PT_LOAD) { in initialize()
375 if (Phdr.p_flags & ELF::PF_X) { in initialize()
390 PreferredTextSegmentAddress = Phdr.p_vaddr; in initialize()
391 assert(Phdr.p_vaddr == (Phdr.p_vaddr & ~(0x1000 - 1U)) && in initialize()
393 assert(Phdr.p_offset == 0 && "Expect p_offset = 0 for symbolization."); in initialize()
/freebsd/contrib/llvm-project/libc/include/llvm-libc-types/
H A Dstruct_dl_phdr_info.h20 const ElfW(Phdr) * dlpi_phdr;
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_solaris.h44 const ElfW(Phdr) * dlpi_phdr;
H A Dsanitizer_platform_limits_solaris.cpp124 unsigned struct_ElfW_Phdr_sz = sizeof(ElfW(Phdr));
/freebsd/contrib/llvm-project/compiler-rt/lib/profile/
H A DInstrProfilingPlatformLinux.c195 const ElfW(Phdr) *ProgramHeader = in __llvm_write_binary_ids()
196 (const ElfW(Phdr) *)((uintptr_t)ElfHeader + ElfHeader->e_phoff); in __llvm_write_binary_ids()
/freebsd/contrib/llvm-project/llvm/lib/Support/Unix/
H A DSignals.inc574 const auto *Phdr = &Info->dlpi_phdr[I];
575 if (Phdr->p_type != PT_LOAD)
577 uintptr_t StartAddress = Info->dlpi_addr + Phdr->p_vaddr;
578 uintptr_t ModuleRelativeAddress = Phdr->p_vaddr;
579 std::array<char, 4> ModeStr = modeStrFromFlags(Phdr->p_flags);
581 Phdr->p_memsz, ModuleCount, &ModeStr[0],
599 const auto *Phdr = &Info->dlpi_phdr[I];
600 if (Phdr->p_type != PT_NOTE)
604 reinterpret_cast<const uint8_t *>(Info->dlpi_addr + Phdr->p_vaddr),
605 Phdr->p_memsz);
/freebsd/sys/sys/
H A Delf_generic.h68 __ElfType(Phdr);
/freebsd/contrib/llvm-project/llvm/lib/ObjectYAML/
H A DELFYAML.cpp1178 IO &IO, ELFYAML::ProgramHeader &Phdr) { in mapping() argument
1179 IO.mapRequired("Type", Phdr.Type); in mapping()
1180 IO.mapOptional("Flags", Phdr.Flags, ELFYAML::ELF_PF(0)); in mapping()
1181 IO.mapOptional("FirstSec", Phdr.FirstSec); in mapping()
1182 IO.mapOptional("LastSec", Phdr.LastSec); in mapping()
1183 IO.mapOptional("VAddr", Phdr.VAddr, Hex64(0)); in mapping()
1184 IO.mapOptional("PAddr", Phdr.PAddr, Phdr.VAddr); in mapping()
1185 IO.mapOptional("Align", Phdr.Align); in mapping()
1186 IO.mapOptional("FileSize", Phdr.FileSize); in mapping()
1187 IO.mapOptional("MemSize", Phdr.MemSize); in mapping()
[all …]
H A DELFEmitter.cpp243 getPhdrFragments(const ELFYAML::ProgramHeader &Phdr,
546 Elf_Phdr Phdr; in initProgramHeaders() local
547 zero(Phdr); in initProgramHeaders()
548 Phdr.p_type = YamlPhdr.Type; in initProgramHeaders()
549 Phdr.p_flags = YamlPhdr.Flags; in initProgramHeaders()
550 Phdr.p_vaddr = YamlPhdr.VAddr; in initProgramHeaders()
551 Phdr.p_paddr = YamlPhdr.PAddr; in initProgramHeaders()
552 PHeaders.push_back(Phdr); in initProgramHeaders()
1147 ELFState<ELFT>::getPhdrFragments(const ELFYAML::ProgramHeader &Phdr, in getPhdrFragments() argument
1150 for (const ELFYAML::Chunk *C : Phdr.Chunks) { in getPhdrFragments()
/freebsd/contrib/llvm-project/compiler-rt/lib/lsan/
H A Dlsan_common_linux.cpp83 const ElfW(Phdr) *phdr = &(info->dlpi_phdr[j]); in ProcessGlobalRegionsCallback()
/freebsd/contrib/elftoolchain/libelf/
H A Dlibelf_align.c73 [ELF_T_PHDR] = MALIGN(Phdr),
/freebsd/sys/cddl/compat/opensolaris/sys/
H A Delf.h38 __sElfN(Phdr);
/freebsd/contrib/llvm-project/llvm/lib/InterfaceStub/
H A DELFObjHandler.cpp70 ElfHeader.e_phentsize = sizeof(typename ELFT::Phdr); in initELFHeader()
174 using Elf_Phdr = typename ELFT::Phdr;

12