InputFiles(Options& opts, const char** archName);
// implementation from ld::dylib::File::DylibHandler
InputFiles(Options& opts, const char** archName);
// implementation from ld::dylib::File::DylibHandler
// searches libraries for name
bool searchLibraries(const char* name, bool searchDylibs, bool searchArchives,
bool dataSymbolOnly, ld::File::AtomHandler&) const;
// searches libraries for name
bool searchLibraries(const char* name, bool searchDylibs, bool searchArchives,
bool dataSymbolOnly, ld::File::AtomHandler&) const;
ld::File* makeFile(const Options::FileInfo& info, bool indirectDylib);
ld::File* addDylib(ld::dylib::File* f, const Options::FileInfo& info);
void logTraceInfo (const char* format, ...) const;
ld::File* makeFile(const Options::FileInfo& info, bool indirectDylib);
ld::File* addDylib(ld::dylib::File* f, const Options::FileInfo& info);
void logTraceInfo (const char* format, ...) const;
static void parseWorkerThread(InputFiles *inputFiles);
void startThread(void (*threadFunc)(InputFiles *)) const;
static void parseWorkerThread(InputFiles *inputFiles);
void startThread(void (*threadFunc)(InputFiles *)) const;
- class CStringEquals {
- public:
- bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); }
- };
- typedef __gnu_cxx::hash_map<const char*, ld::dylib::File*, __gnu_cxx::hash<const char*>, CStringEquals> InstallNameToDylib;
+ typedef std::unordered_map<const char*, ld::dylib::File*, CStringHash, CStringEquals> InstallNameToDylib;
InstallNameToDylib _installPathToDylibs;
std::set<ld::dylib::File*> _allDylibs;
ld::dylib::File* _bundleLoader;
InstallNameToDylib _installPathToDylibs;
std::set<ld::dylib::File*> _allDylibs;
ld::dylib::File* _bundleLoader;
int _remainingInputFiles; // number of input files still to parse
ld::File::Ordinal _indirectDylibOrdinal;
int _remainingInputFiles; // number of input files still to parse
ld::File::Ordinal _indirectDylibOrdinal;
LibraryInfo(ld::dylib::File* dylib) : _lib(dylib), _isDylib(true) {};
LibraryInfo(ld::archive::File* dylib) : _lib(dylib), _isDylib(false) {};
LibraryInfo(ld::dylib::File* dylib) : _lib(dylib), _isDylib(true) {};
LibraryInfo(ld::archive::File* dylib) : _lib(dylib), _isDylib(false) {};
- bool isDylib() { return _isDylib; }
- ld::dylib::File *dylib() { return (ld::dylib::File*)_lib; }
- ld::archive::File *archive() { return (ld::archive::File*)_lib; }
+ 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; }