Lines Matching +full:armv4t +full:- +full:based
1 //===- MachOObjectFile.cpp - Mach-O object file binding -------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
87 return malformedError("Structure read out-of-range"); in getStructOrErr()
195 if (CmdOrErr->cmdsize + Ptr > Obj.getData().end()) in getLoadCommandInfo()
198 if (CmdOrErr->cmdsize < 8) in getLoadCommandInfo()
245 // This is used to check for overlapping of Mach-O elements.
299 S.nsects * SectionSize > Load.C.cmdsize - SegmentLoadSize) in parseSegmentLoadCommand()
780 return malformedError("LC_ID_DYLIB load command in non-dynamic library " in checkDylibIdCommand()
955 uint32_t left = L.cmdsize - sizeof(struct MachO::linker_option_command); in checkLinkerOptCommand()
960 left--; in checkLinkerOptCommand()
971 left -= len; in checkLinkerOptCommand()
1299 Elements.push_back({0, SizeOfHeaders, "Mach-O headers"}); in MachOObjectFile()
1326 // We have a hack here to allow 64-bit Mach-O core files to have in MachOObjectFile()
1630 if (I < LoadCommandCount - 1) { in MachOObjectFile()
1752 LibraryOrdinal - 1 >= Libraries.size() ) { in checkSymbolTable()
1860 if (Sec->isData() || Sec->isBSS()) in getSymbolType()
1918 DRI.d.a = index - 1; in getSymbolSection()
1929 return Entry.n_sect - 1; in getSymbolSectionID()
1952 // In the case if a malformed Mach-O file where the section offset is past in getSectionSize()
1975 if (FileSize - SectOffset < SectSize) in getSectionSize()
1976 return FileSize - SectOffset; in getSectionSize()
2021 DRI.d.a = SectionIndex - 1; in getSection()
2280 unsigned Arch = this->getArch(); in getRelocationTypeName()
2459 Idx + Foo.size() + sizeof(".framework/")-1); in guessLibraryShortName()
2481 Idx + Foo.size() + sizeof(".framework/")-1); in guessLibraryShortName()
2498 Dot = Name.slice(a-2, a-1); in guessLibraryShortName()
2500 a = a - 2; in guessLibraryShortName()
2523 Dot = Lib.slice(Lib.size()-2, Lib.size()-1); in guessLibraryShortName()
2525 Lib = Lib.slice(0, Lib.size()-2); in guessLibraryShortName()
2540 Dot = Lib.slice(Lib.size()-2, Lib.size()-1); in guessLibraryShortName()
2542 Lib = Lib.slice(0, Lib.size()-2); in guessLibraryShortName()
2548 // for an undefined symbol in a linked Mach-O binary that was linked with the
2549 // normal two-level namespace default (that is MH_TWOLEVEL in the header).
2550 // It is passed the index (0 - based) of the library as translated from
2551 // GET_LIBRARY_ORDINAL (1 - based).
2593 Sec.d.a = Rel->getRawDataRefImpl().d.a; in getRelocationRelocatedSection()
2641 uint64_t Index = (Symb.p - DRIstart.p) / SymbolTableEntrySize; in getSymbolIndex()
2665 return "Mach-O 32-bit i386"; in getFileFormatName()
2667 return "Mach-O arm"; in getFileFormatName()
2669 return "Mach-O arm64 (ILP32)"; in getFileFormatName()
2671 return "Mach-O 32-bit ppc"; in getFileFormatName()
2673 return "Mach-O 32-bit unknown"; in getFileFormatName()
2679 return "Mach-O 64-bit x86-64"; in getFileFormatName()
2681 return "Mach-O arm64"; in getFileFormatName()
2683 return "Mach-O 64-bit ppc64"; in getFileFormatName()
2685 return "Mach-O 64-bit unknown"; in getFileFormatName()
2724 return Triple("i386-apple-darwin"); in getArchTriple()
2733 return Triple("x86_64-apple-darwin"); in getArchTriple()
2737 return Triple("x86_64h-apple-darwin"); in getArchTriple()
2745 *ArchFlag = "armv4t"; in getArchTriple()
2746 return Triple("armv4t-apple-darwin"); in getArchTriple()
2750 return Triple("armv5e-apple-darwin"); in getArchTriple()
2754 return Triple("xscale-apple-darwin"); in getArchTriple()
2758 return Triple("armv6-apple-darwin"); in getArchTriple()
2761 *McpuDefault = "cortex-m0"; in getArchTriple()
2764 return Triple("armv6m-apple-darwin"); in getArchTriple()
2768 return Triple("armv7-apple-darwin"); in getArchTriple()
2771 *McpuDefault = "cortex-m4"; in getArchTriple()
2774 return Triple("thumbv7em-apple-darwin"); in getArchTriple()
2777 *McpuDefault = "cortex-a7"; in getArchTriple()
2780 return Triple("armv7k-apple-darwin"); in getArchTriple()
2783 *McpuDefault = "cortex-m3"; in getArchTriple()
2786 return Triple("thumbv7m-apple-darwin"); in getArchTriple()
2789 *McpuDefault = "cortex-a7"; in getArchTriple()
2792 return Triple("armv7s-apple-darwin"); in getArchTriple()
2803 return Triple("arm64-apple-darwin"); in getArchTriple()
2806 *McpuDefault = "apple-a12"; in getArchTriple()
2809 return Triple("arm64e-apple-darwin"); in getArchTriple()
2820 return Triple("arm64_32-apple-darwin"); in getArchTriple()
2829 return Triple("ppc-apple-darwin"); in getArchTriple()
2838 return Triple("ppc64-apple-darwin"); in getArchTriple()
2861 "armv4t", in getValidArchs()
2989 return Stack.back().Start - Trie.begin(); in nodeOffset()
3044 *E = malformedError("dylib ordinal of re-export " + Twine(error) + in pushNode()
3053 if ((int64_t)State.Other > 0 && State.Other > O->getLibraryCount()) { in pushNode()
3056 Twine((int)O->getLibraryCount()) + in pushNode()
3068 *E = malformedError("import name of re-export in export trie data at " in pushNode()
3078 *E = malformedError("import name of re-export in export trie data at " in pushNode()
3111 Twine::utohexstr(State.Current - ExportStart) + in pushNode()
3143 *E = malformedError("edge sub-string in export trie data at node: 0x" + in pushDownUntilBottom()
3144 Twine::utohexstr(Top.Start - Trie.begin()) + in pushDownUntilBottom()
3155 Twine::utohexstr(Top.Start - Trie.begin())); in pushDownUntilBottom()
3162 Twine::utohexstr(Top.Start - Trie.begin()) + in pushDownUntilBottom()
3177 Twine::utohexstr(Stack.back().Start - Trie.begin())); in pushDownUntilBottom()
3184 // with the C++ iterator model. The solution is a non-recursive depth first
3203 Twine::utohexstr(Stack.back().Start - Trie.begin())); in moveNext()
3256 for (const auto &Command : O->load_commands()) { in MachOAbstractFixupEntry()
3258 MachO::segment_command SLC = O->getSegmentLoadCommand(Command); in MachOAbstractFixupEntry()
3264 MachO::segment_command_64 SLC_64 = O->getSegment64LoadCommand(Command); in MachOAbstractFixupEntry()
3280 return O->BindRebaseAddress(SegmentIndex, 0); in segmentAddress()
3284 return O->BindRebaseSegmentName(SegmentIndex); in segmentName()
3288 return O->BindRebaseSectionName(SegmentIndex, SegmentOffset); in sectionName()
3292 return O->BindRebaseAddress(SegmentIndex, SegmentOffset); in address()
3307 SegmentIndex = -1; in moveToFirst()
3326 if (auto FixupTargetsOrErr = O->getDyldChainedFixupTargets()) { in MachOChainedFixupEntry()
3333 if (auto SegmentsOrErr = O->getChainedFixupsSegments()) { in MachOChainedFixupEntry()
3334 Segments = std::move(SegmentsOrErr->second); in MachOChainedFixupEntry()
3353 SegmentData = O->getSegmentContents(Segments[InfoSegIndex].SegIdx); in findNextPageWithFixups()
3419 if (O->isLittleEndian() != sys::IsLittleEndianHost) in moveNext()
3422 // The bit extraction below assumes little-endian fixup entries. in moveNext()
3423 assert(O->isLittleEndian() && "big-endian object should have been rejected " in moveNext()
3426 return (RawValue >> Right) & ((1ULL << Count) - 1); in moveNext()
3441 " has out-of range import ordinal " + in moveNext()
3501 --RemainingLoopCount; in moveNext()
3527 DEBUG_WITH_TYPE("mach-o-rebase", dbgs() << "REBASE_OPCODE_DONE\n"); in moveNext()
3534 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3539 "mach-o-rebase", in moveNext()
3549 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3553 error = O->RebaseEntryCheckSegAndOffsets(SegmentIndex, SegmentOffset, in moveNext()
3558 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3563 "mach-o-rebase", in moveNext()
3574 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3578 error = O->RebaseEntryCheckSegAndOffsets(SegmentIndex, SegmentOffset, in moveNext()
3583 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3587 DEBUG_WITH_TYPE("mach-o-rebase", in moveNext()
3594 error = O->RebaseEntryCheckSegAndOffsets(SegmentIndex, SegmentOffset, in moveNext()
3599 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3603 DEBUG_WITH_TYPE("mach-o-rebase", in moveNext()
3613 RemainingLoopCount = ImmValue - 1; in moveNext()
3616 error = O->RebaseEntryCheckSegAndOffsets(SegmentIndex, SegmentOffset, in moveNext()
3621 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3626 "mach-o-rebase", in moveNext()
3640 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3645 RemainingLoopCount = Count - 1; in moveNext()
3648 error = O->RebaseEntryCheckSegAndOffsets(SegmentIndex, SegmentOffset, in moveNext()
3653 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3658 "mach-o-rebase", in moveNext()
3670 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3677 error = O->RebaseEntryCheckSegAndOffsets(SegmentIndex, SegmentOffset, in moveNext()
3682 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3687 "mach-o-rebase", in moveNext()
3700 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3705 RemainingLoopCount = Count - 1; in moveNext()
3713 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3719 error = O->RebaseEntryCheckSegAndOffsets(SegmentIndex, SegmentOffset, in moveNext()
3725 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3730 "mach-o-rebase", in moveNext()
3740 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3772 // For use with the SegIndex of a checked Mach-O Rebase entry
3775 return O->BindRebaseSegmentName(SegmentIndex); in segmentName()
3778 // For use with a SegIndex,SegOffset pair from a checked Mach-O Rebase entry
3781 return O->BindRebaseSectionName(SegmentIndex, SegmentOffset); in sectionName()
3784 // For use with a SegIndex,SegOffset pair from a checked Mach-O Rebase entry
3787 return O->BindRebaseAddress(SegmentIndex, SegmentOffset); in address()
3804 if (O->BindRebaseSectionTable == nullptr) in rebaseTable()
3805 O->BindRebaseSectionTable = std::make_unique<BindRebaseSegInfo>(O); in rebaseTable()
3840 --RemainingLoopCount; in moveNext()
3879 DEBUG_WITH_TYPE("mach-o-bind", dbgs() << "BIND_OPCODE_DONE\n"); in moveNext()
3885 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3891 if (ImmValue > O->getLibraryCount()) { in moveNext()
3895 Twine((int)O->getLibraryCount()) + in moveNext()
3897 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3902 "mach-o-bind", in moveNext()
3910 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3919 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3923 if (Ordinal > (int)O->getLibraryCount()) { in moveNext()
3927 Twine((int)O->getLibraryCount()) + in moveNext()
3929 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3934 "mach-o-bind", in moveNext()
3942 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3953 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3961 "mach-o-bind", in moveNext()
3975 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
3980 Ptr-SymStart); in moveNext()
3983 "mach-o-bind", in moveNext()
3996 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4001 "mach-o-bind", in moveNext()
4010 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4015 "mach-o-bind", in moveNext()
4025 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4029 error = O->BindEntryCheckSegAndOffsets(SegmentIndex, SegmentOffset, in moveNext()
4034 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4039 "mach-o-bind", in moveNext()
4050 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4054 error = O->BindEntryCheckSegAndOffsets(SegmentIndex, SegmentOffset, in moveNext()
4059 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4063 DEBUG_WITH_TYPE("mach-o-bind", in moveNext()
4071 error = O->BindEntryCheckSegAndOffsets(SegmentIndex, SegmentOffset, in moveNext()
4076 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4084 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4092 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4096 DEBUG_WITH_TYPE("mach-o-bind", in moveNext()
4105 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4109 error = O->BindEntryCheckSegAndOffsets(SegmentIndex, SegmentOffset, in moveNext()
4114 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4123 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4131 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4139 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4146 error = O->BindEntryCheckSegAndOffsets(SegmentIndex, SegmentOffset + in moveNext()
4152 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4158 "mach-o-bind", in moveNext()
4169 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4178 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4187 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4193 error = O->BindEntryCheckSegAndOffsets(SegmentIndex, SegmentOffset + in moveNext()
4198 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4202 DEBUG_WITH_TYPE("mach-o-bind", in moveNext()
4211 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4217 RemainingLoopCount = Count - 1; in moveNext()
4224 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4234 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4243 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4252 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4256 error = O->BindEntryCheckSegAndOffsets(SegmentIndex, SegmentOffset, in moveNext()
4262 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4267 "mach-o-bind", in moveNext()
4277 Twine::utohexstr(OpcodeStart - Opcodes.begin())); in moveNext()
4326 // For use with the SegIndex of a checked Mach-O Bind entry
4329 return O->BindRebaseSegmentName(SegmentIndex); in segmentName()
4332 // For use with a SegIndex,SegOffset pair from a checked Mach-O Bind entry
4335 return O->BindRebaseSectionName(SegmentIndex, SegmentOffset); in sectionName()
4338 // For use with a SegIndex,SegOffset pair from a checked Mach-O Bind entry
4341 return O->BindRebaseAddress(SegmentIndex, SegmentOffset); in address()
4357 uint32_t CurSegIndex = Obj->hasPageZeroSegment() ? 1 : 0; in BindRebaseSegInfo()
4360 for (const SectionRef &Section : Obj->sections()) { in BindRebaseSegInfo()
4370 Obj->getSectionFinalSegmentName(Section.getRawDataRefImpl()); in BindRebaseSegInfo()
4376 Info.SegmentIndex = CurSegIndex - 1; in BindRebaseSegInfo()
4377 Info.OffsetInSegment = Info.Address - CurSegAddress; in BindRebaseSegInfo()
4396 if (SegIndex == -1) in checkSegAndOffsets()
4422 // For use with the SegIndex of a checked Mach-O Bind or Rebase entry
4432 // For use with a SegIndex,SegOffset pair from a checked Mach-O Bind or Rebase
4448 // For use with a SegIndex,SegOffset pair from a checked Mach-O Bind or Rebase
4455 // For use with a SegIndex,SegOffset pair from a checked Mach-O Bind or Rebase
4466 if (O->BindRebaseSectionTable == nullptr) in bindTable()
4467 O->BindRebaseSectionTable = std::make_unique<BindRebaseSegInfo>(O); in bindTable()
4531 return ArrayRef(Base->sectname); in getSectionRawName()
4539 return ArrayRef(Base->segname); in getSectionRawFinalSegmentName()
4617 DRI.d.a = SecNum - 1; in getAnyRelocationSection()
5003 if (!CFOrErr->has_value()) in getChainedFixupsHeader()
5056 if (!CFOrErr->has_value()) in getChainedFixupsSegments()
5064 if (!HeaderOrErr->has_value()) in getChainedFixupsSegments()
5122 // (DYLD_CHAINED_PTR_START_MULTI; 32-bit only). in getChainedFixupsSegments()
5165 if (!CFOrErr->has_value()) in getDyldChainedFixupTargets()
5206 // for both LE and BE hosts, but we assume that the object is little-endian. in getDyldChainedFixupTargets()
5208 return createError("parsing big-endian chained fixups is not implemented"); in getDyldChainedFixupTargets()
5281 this->ReadULEB128s(Info.dataoff, FunctionStarts); in getFunctionStarts()
5373 StringRef ObjectPath = Dir->path(); in findDsymObjectMembers()