| /llvm-project-15.0.7/llvm/tools/llvm-objdump/ |
| H A D | ELFDump.cpp | 152 for (const typename ELFT::Phdr &Phdr : *PhdrRangeOrErr) in getSectionLMA() 153 if ((Phdr.p_type == ELF::PT_LOAD) && (Phdr.p_vaddr <= Sec.getAddress()) && in getSectionLMA() 154 (Phdr.p_vaddr + Phdr.p_memsz > Sec.getAddress())) in getSectionLMA() 155 return Sec.getAddress() - Phdr.p_vaddr + Phdr.p_paddr; in getSectionLMA() 224 for (const typename ELFT::Phdr &Phdr : *ProgramHeaderOrError) { in printProgramHeaders() 225 switch (Phdr.p_type) { in printProgramHeaders() 272 << format(Fmt, (uint64_t)Phdr.p_vaddr) << "paddr " in printProgramHeaders() 273 << format(Fmt, (uint64_t)Phdr.p_paddr) in printProgramHeaders() 278 << ((Phdr.p_flags & ELF::PF_R) ? "r" : "-") in printProgramHeaders() 279 << ((Phdr.p_flags & ELF::PF_W) ? "w" : "-") in printProgramHeaders() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Object/ |
| H A D | ELF.cpp | 541 for (const Elf_Phdr &Phdr : *ProgramHeadersOrError) { in dynamicEntries() 542 if (Phdr.p_type == ELF::PT_DYNAMIC) { in dynamicEntries() 545 Phdr.p_filesz / sizeof(Elf_Dyn)); in dynamicEntries() 590 for (const Elf_Phdr &Phdr : *ProgramHeadersOrError) in toMappedAddr() 591 if (Phdr.p_type == ELF::PT_LOAD) in toMappedAddr() 607 return VAddr < Phdr->p_vaddr; in toMappedAddr() 614 const Elf_Phdr &Phdr = **I; in toMappedAddr() local 615 uint64_t Delta = VAddr - Phdr.p_vaddr; in toMappedAddr() 616 if (Delta >= Phdr.p_filesz) in toMappedAddr() 620 uint64_t Offset = Phdr.p_offset + Delta; in toMappedAddr() [all …]
|
| /llvm-project-15.0.7/llvm/include/llvm/Object/ |
| H A D | ELF.h | 152 const typename ELFT::Phdr &Phdr) { in getPhdrIndexForError() argument 310 if (Phdr.p_offset + Phdr.p_filesz > getBufSize()) { in notes_begin() 316 return Elf_Note_Iterator(base() + Phdr.p_offset, Phdr.p_filesz, Err); in notes_begin() 352 return make_range(notes_begin(Phdr, Err), notes_end()); in notes() 523 uintX_t Offset = Phdr.p_offset; in getSegmentContents() 524 uintX_t Size = Phdr.p_filesz; in getSegmentContents() 773 for (auto Phdr : *PhdrsOrErr) { in createFakeSections() 774 if (!(Phdr.p_type & ELF::PT_LOAD) || !(Phdr.p_flags & ELF::PF_X)) in createFakeSections() 779 FakeShdr.sh_addr = Phdr.p_vaddr; in createFakeSections() 780 FakeShdr.sh_size = Phdr.p_memsz; in createFakeSections() [all …]
|
| H A D | ELFTypes.h | 62 using Phdr = Elf_Phdr_Impl<ELFType<E, Is64>>; member 84 using PhdrRange = ArrayRef<Phdr>; 117 using Elf_Phdr = typename ELFT::Phdr; \
|
| /llvm-project-15.0.7/llvm/tools/llvm-readobj/ |
| H A D | DwarfCFIEHPrinter.h | 33 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 D | ELFDumper.cpp | 4186 static bool checkTLSSections(const typename ELFT::Phdr &Phdr, in checkTLSSections() argument 4195 return (Phdr.p_type == ELF::PT_TLS) || (Phdr.p_type == ELF::PT_LOAD) || in checkTLSSections() 4204 static bool checkOffsets(const typename ELFT::Phdr &Phdr, in checkOffsets() argument 4215 return (Sec.sh_offset + 1 <= Phdr.p_offset + Phdr.p_filesz); in checkOffsets() 4216 return Sec.sh_offset + Sec.sh_size <= Phdr.p_offset + Phdr.p_filesz; in checkOffsets() 4222 static bool checkVMA(const typename ELFT::Phdr &Phdr, in checkVMA() argument 4236 return Sec.sh_addr + 1 <= Phdr.p_vaddr + Phdr.p_memsz; in checkVMA() 4237 return Sec.sh_addr + Sec.sh_size <= Phdr.p_vaddr + Phdr.p_memsz; in checkVMA() 4241 static bool checkPTDynamic(const typename ELFT::Phdr &Phdr, in checkPTDynamic() argument 4251 Sec.sh_offset < Phdr.p_offset + Phdr.p_filesz); in checkPTDynamic() [all …]
|
| /llvm-project-15.0.7/compiler-rt/lib/hwasan/ |
| H A D | hwasan_globals.cpp | 27 static void CheckCodeModel(ElfW(Addr) base, const ElfW(Phdr) * phdr, in CheckCodeModel() 51 const ElfW(Phdr) * phdr, in HwasanGlobalsFor()
|
| H A D | hwasan_interface_internal.h | 30 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 D | hwasan_globals.h | 44 const ElfW(Phdr) * phdr,
|
| H A D | hwasan.cpp | 317 reinterpret_cast<const ElfW(Phdr) *>( in __hwasan_init_static() 377 void __hwasan_library_loaded(ElfW(Addr) base, const ElfW(Phdr) * phdr, in __hwasan_library_loaded() 383 void __hwasan_library_unloaded(ElfW(Addr) base, const ElfW(Phdr) * phdr, in __hwasan_library_unloaded()
|
| H A D | hwasan_report.cpp | 272 auto *phdr_begin = reinterpret_cast<const ElfW(Phdr) *>( in GetGlobalSizeFromDescriptor() 281 ArrayRef<const ElfW(Phdr)>(phdr_begin, phdr_begin + ehdr->e_phnum)) { in GetGlobalSizeFromDescriptor()
|
| /llvm-project-15.0.7/llvm/tools/obj2yaml/ |
| H A D | elf2yaml.cpp | 441 const typename ELFT::Phdr &Phdr) { in isInSegment() argument 448 SHdr.sh_offset >= Phdr.p_offset && in isInSegment() 449 (SHdr.sh_offset + SHdr.sh_size <= Phdr.p_offset + Phdr.p_filesz); in isInSegment() 452 SHdr.sh_addr <= Phdr.p_vaddr + Phdr.p_memsz; in isInSegment() 459 SHdr.sh_offset == Phdr.p_offset + Phdr.p_filesz)) in isInSegment() 481 for (const typename ELFT::Phdr &Phdr : *PhdrsOrErr) { in dumpProgramHeaders() 483 PH.Type = Phdr.p_type; in dumpProgramHeaders() 484 PH.Flags = Phdr.p_flags; in dumpProgramHeaders() 485 PH.VAddr = Phdr.p_vaddr; in dumpProgramHeaders() 486 PH.PAddr = Phdr.p_paddr; in dumpProgramHeaders() [all …]
|
| /llvm-project-15.0.7/llvm/lib/ObjCopy/ELF/ |
| H A D | ELFObject.cpp | 41 Phdr.p_type = Seg.Type; in writePhdr() 42 Phdr.p_flags = Seg.Flags; in writePhdr() 43 Phdr.p_offset = Seg.Offset; in writePhdr() 44 Phdr.p_vaddr = Seg.VAddr; in writePhdr() 45 Phdr.p_paddr = Seg.PAddr; in writePhdr() 46 Phdr.p_filesz = Seg.FileSize; in writePhdr() 47 Phdr.p_memsz = Seg.MemSize; in writePhdr() 48 Phdr.p_align = Seg.Align; in writePhdr() 1391 if (Phdr.p_offset + Phdr.p_filesz > HeadersFile.getBufSize()) in readProgramHeaders() 1401 Seg.Type = Phdr.p_type; in readProgramHeaders() [all …]
|
| /llvm-project-15.0.7/llvm/tools/llvm-gsymutil/ |
| H A D | llvm-gsymutil.cpp | 196 for (const typename ELFT::Phdr &Phdr : *PhdrRangeOrErr) in getImageBaseAddress() 197 if (Phdr.p_type == ELF::PT_LOAD) in getImageBaseAddress() 198 return (uint64_t)Phdr.p_vaddr; in getImageBaseAddress()
|
| /llvm-project-15.0.7/llvm/tools/llvm-profgen/ |
| H A D | ProfiledBinary.cpp | 298 for (const typename ELFT::Phdr &Phdr : PhdrRange) { in setPreferredTextSegmentAddresses() local 299 if (Phdr.p_type == ELF::PT_LOAD) { in setPreferredTextSegmentAddresses() 301 FirstLoadableAddress = Phdr.p_vaddr & ~(PageSize - 1U); in setPreferredTextSegmentAddresses() 302 if (Phdr.p_flags & ELF::PF_X) { in setPreferredTextSegmentAddresses() 304 PreferredTextSegmentAddresses.push_back(Phdr.p_vaddr & in setPreferredTextSegmentAddresses() 306 TextSegmentOffsets.push_back(Phdr.p_offset & ~(PageSize - 1U)); in setPreferredTextSegmentAddresses()
|
| /llvm-project-15.0.7/compiler-rt/lib/sanitizer_common/ |
| H A D | sanitizer_solaris.h | 44 const ElfW(Phdr) * dlpi_phdr;
|
| H A D | sanitizer_platform_limits_solaris.cpp | 123 unsigned struct_ElfW_Phdr_sz = sizeof(ElfW(Phdr));
|
| /llvm-project-15.0.7/bolt/lib/Rewrite/ |
| H A D | RewriteInstance.cpp | 434 for (const ELF64LE::Phdr &Phdr : PHs) { in discoverStorage() local 435 switch (Phdr.p_type) { in discoverStorage() 440 Phdr.p_vaddr + Phdr.p_memsz); in discoverStorage() 442 Phdr.p_offset + Phdr.p_filesz); in discoverStorage() 444 BC->SegmentMapInfo[Phdr.p_vaddr] = SegmentInfo{Phdr.p_vaddr, in discoverStorage() 3925 for (const ELF64LE::Phdr &Phdr : cantFail(Obj.program_headers())) { in patchELFPHDRTable() local 3926 ELF64LE::Phdr NewPhdr = Phdr; in patchELFPHDRTable() 5060 DynamicOffset = Phdr.p_offset; in patchELFDynamic() 5061 DynamicPhdr = &Phdr; in patchELFDynamic() 5062 assert(Phdr.p_memsz == Phdr.p_filesz && "dynamic sizes should match"); in patchELFDynamic() [all …]
|
| /llvm-project-15.0.7/compiler-rt/lib/profile/ |
| H A D | InstrProfilingPlatformLinux.c | 179 const ElfW(Phdr) *ProgramHeader = in __llvm_write_binary_ids() 180 (const ElfW(Phdr) *)((uintptr_t)ElfHeader + ElfHeader->e_phoff); in __llvm_write_binary_ids()
|
| /llvm-project-15.0.7/llvm/lib/ObjectYAML/ |
| H A D | ELFYAML.cpp | 1098 IO &IO, ELFYAML::ProgramHeader &Phdr) { in mapping() argument 1099 IO.mapRequired("Type", Phdr.Type); in mapping() 1100 IO.mapOptional("Flags", Phdr.Flags, ELFYAML::ELF_PF(0)); in mapping() 1101 IO.mapOptional("FirstSec", Phdr.FirstSec); in mapping() 1102 IO.mapOptional("LastSec", Phdr.LastSec); in mapping() 1103 IO.mapOptional("VAddr", Phdr.VAddr, Hex64(0)); in mapping() 1104 IO.mapOptional("PAddr", Phdr.PAddr, Phdr.VAddr); in mapping() 1105 IO.mapOptional("Align", Phdr.Align); in mapping() 1106 IO.mapOptional("FileSize", Phdr.FileSize); in mapping() 1107 IO.mapOptional("MemSize", Phdr.MemSize); in mapping() [all …]
|
| H A D | ELFEmitter.cpp | 238 getPhdrFragments(const ELFYAML::ProgramHeader &Phdr, 545 Elf_Phdr Phdr; in initProgramHeaders() local 546 zero(Phdr); in initProgramHeaders() 547 Phdr.p_type = YamlPhdr.Type; in initProgramHeaders() 548 Phdr.p_flags = YamlPhdr.Flags; in initProgramHeaders() 549 Phdr.p_vaddr = YamlPhdr.VAddr; in initProgramHeaders() 550 Phdr.p_paddr = YamlPhdr.PAddr; in initProgramHeaders() 551 PHeaders.push_back(Phdr); in initProgramHeaders() 1146 ELFState<ELFT>::getPhdrFragments(const ELFYAML::ProgramHeader &Phdr, in getPhdrFragments() argument 1149 for (const ELFYAML::Chunk *C : Phdr.Chunks) { in getPhdrFragments()
|
| /llvm-project-15.0.7/compiler-rt/lib/lsan/ |
| H A D | lsan_common_linux.cpp | 83 const ElfW(Phdr) *phdr = &(info->dlpi_phdr[j]); in ProcessGlobalRegionsCallback()
|
| /llvm-project-15.0.7/llvm/lib/InterfaceStub/ |
| H A D | ELFObjHandler.cpp | 69 ElfHeader.e_phentsize = sizeof(typename ELFT::Phdr); in initELFHeader() 173 using Elf_Phdr = typename ELFT::Phdr;
|
| /llvm-project-15.0.7/compiler-rt/lib/cfi/ |
| H A D | cfi.cpp | 26 typedef ElfW(Phdr) Elf_Phdr;
|
| /llvm-project-15.0.7/libunwind/src/ |
| H A D | AddressSpace.hpp | 370 typedef ElfW(Phdr) Elf_Phdr;
|