Home
last modified time | relevance | path

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

12

/freebsd/contrib/llvm-project/llvm/include/llvm/Object/
H A DELF.h155 const typename ELFT::Phdr &Phdr) { in getPhdrIndexForError() argument
158 return ("[index " + Twine(&Phdr - &Headers->front()) + "]").str(); in getPhdrIndexForError()
169 bool checkSectionOffsets(const typename ELFT::Phdr &Phdr, in checkSectionOffsets() argument
175 if (Sec.sh_offset < Phdr.p_offset) in checkSectionOffsets()
180 return (Sec.sh_offset + 1 <= Phdr.p_offset + Phdr.p_filesz); in checkSectionOffsets()
181 return Sec.sh_offset + Sec.sh_size <= Phdr.p_offset + Phdr.p_filesz; in checkSectionOffsets()
187 bool checkSectionVMA(const typename ELFT::Phdr &Phdr, in checkSectionVMA() argument
192 if (Sec.sh_addr < Phdr.p_vaddr) in checkSectionVMA()
198 bool IsTbssInNonTLS = IsTbss && Phdr.p_type != ELF::PT_TLS; in checkSectionVMA()
201 return Sec.sh_addr + 1 <= Phdr.p_vaddr + Phdr.p_memsz; in checkSectionVMA()
[all …]
H A DELFTypes.h63 using Phdr = Elf_Phdr_Impl<ELFType<E, Is64>>; member
86 using PhdrRange = ArrayRef<Phdr>;
119 using Elf_Phdr = typename ELFT::Phdr; \
/freebsd/contrib/llvm-project/llvm/tools/llvm-objdump/
H A DELFDump.cpp187 for (const typename ELFT::Phdr &Phdr : *PhdrRangeOrErr) in getSectionLMA()
188 if ((Phdr.p_type == ELF::PT_LOAD) && in getSectionLMA()
190 Phdr, *cast<const ELFObjectFile<ELFT>>(Sec.getObject()) in getSectionLMA()
192 return Sec.getAddress() - Phdr.p_vaddr + Phdr.p_paddr; in getSectionLMA()
261 for (const typename ELFT::Phdr &Phdr : *ProgramHeaderOrError) { in printProgramHeaders()
262 switch (Phdr.p_type) { in printProgramHeaders()
317 outs() << "off " << format(Fmt, (uint64_t)Phdr.p_offset) << "vaddr " in printProgramHeaders()
318 << format(Fmt, (uint64_t)Phdr.p_vaddr) << "paddr " in printProgramHeaders()
319 << format(Fmt, (uint64_t)Phdr.p_paddr) in printProgramHeaders()
320 << 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.cpp614 for (const Elf_Phdr &Phdr : *ProgramHeadersOrError) { in dynamicEntries()
615 if (Phdr.p_type == ELF::PT_DYNAMIC) { in dynamicEntries()
616 const uint8_t *DynOffset = base() + Phdr.p_offset; in dynamicEntries()
621 Phdr.p_filesz / sizeof(Elf_Dyn)); in dynamicEntries()
666 for (const Elf_Phdr &Phdr : *ProgramHeadersOrError) in toMappedAddr()
667 if (Phdr.p_type == ELF::PT_LOAD) in toMappedAddr()
668 LoadSegments.push_back(const_cast<Elf_Phdr *>(&Phdr)); in toMappedAddr()
682 LoadSegments, VAddr, [](uint64_t VAddr, const Elf_Phdr_Impl<ELFT> *Phdr) { in toMappedAddr() argument
683 return VAddr < Phdr->p_vaddr; in toMappedAddr()
690 const Elf_Phdr &Phdr = **I; in toMappedAddr() local
[all …]
/freebsd/contrib/llvm-project/llvm/tools/llvm-readobj/
H A DDwarfCFIEHPrinter.h33 using Elf_Phdr = typename ELFT::Phdr;
70 for (const Elf_Phdr &Phdr : *PhdrsOrErr) { in printUnwindInformation()
71 if (Phdr.p_type != ELF::PT_GNU_EH_FRAME) in printUnwindInformation()
74 if (Phdr.p_memsz != Phdr.p_filesz) in printUnwindInformation()
78 printEHFrameHdr(&Phdr); in printUnwindInformation()
H A DELFDumper.cpp1769 std::pair<const typename ELFT::Phdr *, const typename ELFT::Shdr *>
1774 for (const Elf_Phdr &Phdr : *PhdrsOrErr) { in findDynamic()
1775 if (Phdr.p_type != ELF::PT_DYNAMIC) in findDynamic()
1777 DynamicPhdr = &Phdr; in findDynamic()
4653 static bool checkTLSSections(const typename ELFT::Phdr &Phdr, in checkTLSSections() argument
4658 return Phdr.p_type == ELF::PT_TLS; in checkTLSSections()
4662 return (Phdr.p_type == ELF::PT_TLS) || (Phdr.p_type == ELF::PT_LOAD) || in checkTLSSections()
4663 (Phdr.p_type == ELF::PT_GNU_RELRO); in checkTLSSections()
4667 return Phdr.p_type != ELF::PT_TLS; in checkTLSSections()
4671 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/llvm/lib/ProfileData/
H A DMemProfReader.cpp390 for (const auto &Phdr : *PHdrsOr) { in initialize()
391 if (Phdr.p_type == ELF::PT_LOAD) { in initialize()
392 if (Phdr.p_flags & ELF::PF_X) { in initialize()
407 PreferredTextSegmentAddress = Phdr.p_vaddr; in initialize()
408 assert(Phdr.p_vaddr == (Phdr.p_vaddr & ~(0x1000 - 1U)) && in initialize()
410 assert(Phdr.p_offset == 0 && "Expect p_offset = 0 for symbolization."); in initialize()
/freebsd/contrib/llvm-project/llvm/lib/ObjCopy/ELF/
H A DELFObject.cpp42 Elf_Phdr &Phdr = *reinterpret_cast<Elf_Phdr *>(B); in writePhdr() local
43 Phdr.p_type = Seg.Type; in writePhdr()
44 Phdr.p_flags = Seg.Flags; in writePhdr()
45 Phdr.p_offset = Seg.Offset; in writePhdr()
46 Phdr.p_vaddr = Seg.VAddr; in writePhdr()
47 Phdr.p_paddr = Seg.PAddr; in writePhdr()
48 Phdr.p_filesz = Seg.FileSize; in writePhdr()
49 Phdr.p_memsz = Seg.MemSize; in writePhdr()
50 Phdr.p_align = Seg.Align; in writePhdr()
1458 for (const typename ELFFile<ELFT>::Elf_Phdr &Phdr : *Headers) { in readProgramHeaders()
[all …]
/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.cpp123 unsigned struct_ElfW_Phdr_sz = sizeof(ElfW(Phdr));
/freebsd/contrib/llvm-project/compiler-rt/lib/profile/
H A DInstrProfilingPlatformLinux.c182 const ElfW(Phdr) *ProgramHeader = in __llvm_write_binary_ids()
183 (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.inc536 const auto *Phdr = &Info->dlpi_phdr[I];
537 if (Phdr->p_type != PT_LOAD)
539 uintptr_t StartAddress = Info->dlpi_addr + Phdr->p_vaddr;
540 uintptr_t ModuleRelativeAddress = Phdr->p_vaddr;
541 std::array<char, 4> ModeStr = modeStrFromFlags(Phdr->p_flags);
543 Phdr->p_memsz, ModuleCount, &ModeStr[0],
561 const auto *Phdr = &Info->dlpi_phdr[I];
562 if (Phdr->p_type != PT_NOTE)
566 reinterpret_cast<const uint8_t *>(Info->dlpi_addr + Phdr->p_vaddr),
567 Phdr->p_memsz);
/freebsd/sys/sys/
H A Delf_generic.h68 __ElfType(Phdr);
/freebsd/contrib/llvm-project/llvm/lib/ObjectYAML/
H A DELFYAML.cpp1146 IO &IO, ELFYAML::ProgramHeader &Phdr) { in mapping() argument
1147 IO.mapRequired("Type", Phdr.Type); in mapping()
1148 IO.mapOptional("Flags", Phdr.Flags, ELFYAML::ELF_PF(0)); in mapping()
1149 IO.mapOptional("FirstSec", Phdr.FirstSec); in mapping()
1150 IO.mapOptional("LastSec", Phdr.LastSec); in mapping()
1151 IO.mapOptional("VAddr", Phdr.VAddr, Hex64(0)); in mapping()
1152 IO.mapOptional("PAddr", Phdr.PAddr, Phdr.VAddr); in mapping()
1153 IO.mapOptional("Align", Phdr.Align); in mapping()
1154 IO.mapOptional("FileSize", Phdr.FileSize); in mapping()
1155 IO.mapOptional("MemSize", Phdr.MemSize); in mapping()
[all …]
H A DELFEmitter.cpp246 getPhdrFragments(const ELFYAML::ProgramHeader &Phdr,
553 Elf_Phdr Phdr; in initProgramHeaders() local
554 zero(Phdr); in initProgramHeaders()
555 Phdr.p_type = YamlPhdr.Type; in initProgramHeaders()
556 Phdr.p_flags = YamlPhdr.Flags; in initProgramHeaders()
557 Phdr.p_vaddr = YamlPhdr.VAddr; in initProgramHeaders()
558 Phdr.p_paddr = YamlPhdr.PAddr; in initProgramHeaders()
559 PHeaders.push_back(Phdr); in initProgramHeaders()
1154 ELFState<ELFT>::getPhdrFragments(const ELFYAML::ProgramHeader &Phdr, in getPhdrFragments() argument
1157 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),
H A Delf_types.m450 `PHDR, 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;
/freebsd/contrib/llvm-project/compiler-rt/lib/cfi/
H A Dcfi.cpp26 typedef ElfW(Phdr) Elf_Phdr;

12