X-Git-Url: https://git.saurik.com/apple/ld64.git/blobdiff_plain/d425e3882ca60fabae080ddb890789ef2e73a66b..eaf282aaf65b222563e6b3db98e12d720fb161bf:/src/ld/InputFiles.h diff --git a/src/ld/InputFiles.h b/src/ld/InputFiles.h index 9b969ee..608ce39 100644 --- a/src/ld/InputFiles.h +++ b/src/ld/InputFiles.h @@ -63,7 +63,7 @@ public: virtual ld::dylib::File* findDylib(const char* installPath, const char* fromPath); // iterates all atoms in initial files - void forEachInitialAtom(ld::File::AtomHandler&); + void forEachInitialAtom(ld::File::AtomHandler&, ld::Internal& state); // searches libraries for name bool searchLibraries(const char* name, bool searchDylibs, bool searchArchives, bool dataSymbolOnly, ld::File::AtomHandler&) const; @@ -74,6 +74,9 @@ public: bool inferredArch() const { return _inferredArch; } + void addLinkerOptionLibraries(ld::Internal& state, ld::File::AtomHandler& handler); + void createIndirectDylibs(); + // for -print_statistics volatile int64_t _totalObjectSize; volatile int64_t _totalArchiveSize; @@ -90,12 +93,13 @@ private: void logTraceInfo (const char* format, ...) const; void logDylib(ld::File*, bool indirect); void logArchive(ld::File*) const; - void createIndirectDylibs(); + void markExplicitlyLinkedDylibs(); void checkDylibClientRestrictions(ld::dylib::File*); void createOpaqueFileSections(); + bool libraryAlreadyLoaded(const char* path); // for pipelined linking - void waitForInputFiles(); + void waitForInputFiles(); static void waitForInputFiles(InputFiles *inputFiles); // for threaded input file processing @@ -111,7 +115,6 @@ private: InstallNameToDylib _installPathToDylibs; std::set _allDylibs; ld::dylib::File* _bundleLoader; - bool _allDirectDylibsLoaded; bool _inferredArch; struct strcompclass { bool operator() (const char *a, const char *b) const { return ::strcmp(a, b) < 0; } @@ -132,6 +135,7 @@ private: int _remainingInputFiles; // number of input files still to parse ld::File::Ordinal _indirectDylibOrdinal; + ld::File::Ordinal _linkerOptionOrdinal; class LibraryInfo { ld::File* _lib;