Lines Matching +full:assigned +full:- +full:resolution +full:- +full:bits
1 //===- SyntheticSections.h -------------------------------------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
48 return sec->kind() == SyntheticKind; in classof()
62 align = target->wordSize; in LinkEditSection()
65 // Implementations of this method can assume that the regular (non-__LINKEDIT)
66 // sections already have their addresses assigned.
77 // __LINKEDIT ends where the next one starts -- no gaps are permitted. We
81 // zero-valued bytes.
85 // The header of the Mach-O file, which must have a file offset of zero.
106 bool isNeeded() const override { return target->pageZeroSize != 0; } in isNeeded()
107 uint64_t getSize() const override { return target->pageZeroSize; } in getSize()
113 // functionally identical -- they will both be populated by dyld with addresses
114 // to non-lazily-loaded dylib symbols. The main difference is that the
115 // TLVPointerSection stores references to thread-local variables.
122 return entries.size() * target->wordSize; in getSize()
127 return addr + gotIndex * target->wordSize; in getVA()
150 uint64_t getVA() const { return isec->getVA(offset); } in getVA()
165 if (config->isPic) in addEntry()
184 // Stores bind opcodes for telling dyld which symbols to load non-lazily.
206 // 1) Non-weak definitions: This is a symbol definition that weak symbols in
210 // coalesce to a non-weak definition if one is found. Note that unlike the
243 // The following sections implement lazy symbol binding -- very similar to the
246 // ELF's .plt section is broken up into two sections in Mach-O: StubsSection
251 // We will first describe how non-weak symbols are handled.
258 // dyld_stub_binder is a non-lazily-bound symbol, so this call looks it up in
264 // calls don't have to redo the symbol resolution. The binder will then jump to
268 // "weak lazy" lookup, function calls to weak symbols are always non-lazily
269 // bound. We emit both regular non-lazy bindings as well as weak bindings, in
270 // order that the weak bindings may overwrite the non-lazy bindings if an
272 // still be written (non-lazily) into the LazyPointerSection.
292 assert(isFinal || target->usesThunks()); in getVA()
294 // stub before its address is assigned. Before __stubs is in getVA()
295 // finalized, return a contrived out-of-range address. in getVA()
296 return isFinal ? addr + stubsIndex * target->stubSize in getVA()
300 bool isFinal = false; // is address assigned?
332 // Objective-C stubs are hoisted objc_msgSend calls per selector called in the
344 void finalize() override { isec->isFinal = true; } in finalize()
357 // Note that this section may also be targeted by non-lazy bindings. In
366 return addr + (index << target->p2WordSize); in getVA()
407 // inside code sections. This is used by llvm-objdump to distinguish jump tables
504 // The indirect symbol table is a list of 32-bit integers that serve as indices
506 // concatenation of several sub-arrays of indices, each sub-array belonging to
507 // a separate section. The starting offset of each sub-array is stored in the
510 // These sub-arrays provide symbol information for sections that store
529 // NOTE: These values are duplicated in llvm-objcopy's MachO/Object.h file
588 * This section contains deduplicated literal values. The 16-byte values are
589 * laid out first, followed by the 8- and then the 4-byte ones.
595 // sure it's exact -- that way we can construct it via `mmap`.
634 // support all possible integer values -- there are no suitable tombstone
647 assert(!file->objCImageInfo.empty()); in addFile()
662 // This section stores 32-bit __TEXT segment offsets of initializer functions.
667 // read-only __TEXT segment instead. This section is used by default when
689 // relative method lists if the -objc_relative_method_lists option is enabled.
719 // Relative method lists are supported only for 3-pointer method lists
745 // This setup allows pages to be relocated lazily at page-in time and without
747 // technique, called page-in linking, was introduced in macOS 13.
750 // - smaller __LINKEDIT segment, as most of the fixup information is stored in
752 // - faster startup, since not all relocations need to be done upfront
753 // - slightly lower memory usage, as fewer pages are dirtied
756 // - Rebase entries contain an absolute address, to which the object's load
759 // - Binding entries are mostly used for symbols imported from other dylibs,
767 // The entries are tightly packed 64-bit bitfields. One of the bits specifies
774 // 2. After addresses have been assigned to all sections, and thus the memory