Lines Matching +defs:file +defs:start

9 // This file contains functions to parse Mach-O object files. In this comment,
10 // we describe the Mach-O file structure and how we parse it.
26 // symbol with N_ALT_ENTRY attribute does not start a new subsection and can
32 // to fix up addresses if subsections are laid out in an output file differently
91 // Multiple dylibs can be defined in one .tbd file.
102 return (toString(sec.file) + ":(" + sec.name + ")").str();
189 static bool compatWithTargetArch(const InputFile *file, const Header *hdr) {
200 msg(toString(file) + " has architecture " + getArchitectureName(arch) +
206 return checkCompatibility(file);
215 // Open a given file path and return it as a memory-mapped file.
232 // If this is a regular non-fat file, return it.
245 // real files for different CPU ISAs. Here, we search for a file that matches
256 error(path + ": fat_arch struct extends beyond end of file");
275 error(path + ": slice extends beyond end of file");
283 warn(path + ": ignoring file because it is universal (" + join(archs, ",") +
439 // expect this alignment. Moreover, each EH frame must start where the
469 // offset: an offset relative to the start of the original InputSection (before
471 // same location as an offset relative to the start of the containing
501 static bool validateRelocationInfo(InputFile *file, const SectionHeader &sec,
505 auto message = [relocAttrs, file, sec, rel, &valid](const Twine &diagnostic) {
509 sec.sectname + " in " + toString(file))
598 // in terms of the addresses in the input file. Here we adjust it so
599 // that it describes the offset from the start of the referent section.
602 // the arch-specific .cpp file.
693 // ld64 will pick the one from the file built without
736 static macho::Symbol *createAbsolute(const NList &sym, InputFile *file,
742 return symtab->addDefined(name, file, nullptr, sym.n_value, /*size=*/0,
748 return make<Defined>(name, file, nullptr, sym.n_value, /*size=*/0,
772 // Not much point in making local aliases -- relocs in the current file can
891 // 1. If the input file does not use subsections-via-symbols.
933 // will all be resolved to the same file, instead of being resolved to
944 sections.push_back(make<Section>(/*file=*/this, segName.take_front(16),
1099 // FIXME: There can be more than one compile unit per object file. See
1133 // pointers. Since these locations are at the start and end of the entry,
1166 // Check whether the symbol defined in this file is the prevailing one.
1315 // <CIE start>
1319 // <FDE start>
1323 // If any of the FDEs in `multiple FDEs` get dead-stripped, then `FDE start`
1326 // our relocation by adding an `EH_Frame` symbol at `FDE start`, and updating
1387 // We also need to handle the case where our input object file has explicit
1409 size_t dataOff = 0; // Offset from the start of the EH frame.
1411 // cieOffOff is the offset from the start of the EH frame to the cieOff
1559 // The path can point to either a dylib or a .tbd file.
1563 error("could not read dylib file at " + path);
1571 // processing a given TBD file, we store that top-level document in
1573 // potentially matching documents in the same TBD file. Note that the children
1644 auto *file = make<DylibFile>(child, umbrella, /*isBundleLoader=*/false,
1646 file->parseReexports(child);
1647 return file;
2056 VersionTuple start;
2057 if (start.tryParse(startVersion)) {
2058 warn(toString(this) + ": failed to parse start version, symbol '" +
2068 if (config->platformInfo.target.MinDeployment < start ||
2093 // The tbd file usually contains the $ld$previous symbol for an old version,
2153 : InputFile(ArchiveKind, f->getMemoryBufferRef()), file(std::move(f)),
2159 if (file->isEmpty() || file->getNumberOfSymbols() == 0)
2163 auto child = file->child_begin(err);
2185 for (const object::Archive::Symbol &sym : file->symbols())
2205 " has unhandled file type");
2221 Expected<InputFile *> file =
2225 if (!file)
2226 return file.takeError();
2228 inputFiles.insert(*file);
2229 printArchiveMemberLoad(reason, *file);
2252 BitcodeFile &file) {
2256 return symtab->addUndefined(name, &file, /*isWeakRef=*/objSym.isWeak());
2272 file.forceHidden;
2275 return symtab->addCommon(name, &file, objSym.getCommonSize(),
2278 return symtab->addDefined(name, &file, /*isec=*/nullptr, /*value=*/0,
2353 void macho::extract(InputFile &file, StringRef reason) {
2354 if (!file.lazy)
2356 file.lazy = false;
2358 printArchiveMemberLoad(reason, &file);
2359 if (auto *bitcode = dyn_cast<BitcodeFile>(&file)) {
2362 auto &f = cast<ObjFile>(file);