+ struct strcompclass {
+ bool operator() (const char *a, const char *b) const { return ::strcmp(a, b) < 0; }
+ };
+
+ // for threaded input file processing
+#if HAVE_PTHREADS
+ pthread_mutex_t _parseLock;
+ pthread_cond_t _parseWorkReady; // used by parse threads to block for work
+ pthread_cond_t _newFileAvailable; // used by main thread to block for parsed input files
+ int _availableWorkers; // number of remaining unstarted parse threads
+ int _idleWorkers; // number of running parse threads that are idle
+ int _neededFileSlot; // input file the resolver is currently blocked waiting for
+ int _parseCursor; // slot to begin searching for a file to parse
+ int _availableInputFiles; // number of input fileinfos with readyToParse==true
+#endif
+ const char * _exception; // passes an exception message from parse thread to main thread
+ int _remainingInputFiles; // number of input files still to parse
+
+ ld::File::Ordinal _indirectDylibOrdinal;
+ ld::File::Ordinal _linkerOptionOrdinal;
+
+ class LibraryInfo {
+ ld::File* _lib;
+ bool _isDylib;
+ public:
+ LibraryInfo(ld::dylib::File* dylib) : _lib(dylib), _isDylib(true) {};
+ LibraryInfo(ld::archive::File* dylib) : _lib(dylib), _isDylib(false) {};
+
+ bool isDylib() const { return _isDylib; }
+ ld::dylib::File *dylib() const { return (ld::dylib::File*)_lib; }
+ ld::archive::File *archive() const { return (ld::archive::File*)_lib; }
+ };
+ std::vector<LibraryInfo> _searchLibraries;