cmBinUtilsLinuxELFLinker.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmBinUtilsLinuxELFLinker_h
  4. #define cmBinUtilsLinuxELFLinker_h
  5. #include "cmBinUtilsLinker.h"
  6. #include "cmBinUtilsLinuxELFGetRuntimeDependenciesTool.h"
  7. #include "cmLDConfigTool.h"
  8. #include "cmStateTypes.h"
  9. #include <memory>
  10. #include <string>
  11. #include <vector>
  12. class cmRuntimeDependencyArchive;
  13. class cmBinUtilsLinuxELFLinker : public cmBinUtilsLinker
  14. {
  15. public:
  16. cmBinUtilsLinuxELFLinker(cmRuntimeDependencyArchive* archive);
  17. bool Prepare() override;
  18. bool ScanDependencies(std::string const& file,
  19. cmStateEnums::TargetType type) override;
  20. private:
  21. std::unique_ptr<cmBinUtilsLinuxELFGetRuntimeDependenciesTool> Tool;
  22. std::unique_ptr<cmLDConfigTool> LDConfigTool;
  23. bool HaveLDConfigPaths = false;
  24. std::vector<std::string> LDConfigPaths;
  25. bool ScanDependencies(std::string const& file,
  26. std::vector<std::string> const& parentRpaths);
  27. bool ResolveDependency(std::string const& name,
  28. std::vector<std::string> const& searchPaths,
  29. std::string& path, bool& resolved);
  30. bool GetLDConfigPaths();
  31. };
  32. #endif // cmBinUtilsLinuxELFLinker_h