Class: Bwrap::Resolvers::Library::LLVMReadelf Private
- Defined in:
- lib/bwrap/resolvers/library/llvm_readelf.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Used via Bwrap::Resolvers::Library.
Instance Method Summary collapse
-
#needed_libraries(binary_paths) ⇒ Object
private
Resolve dependents using llvm-readelf.
Methods included from Output
debug?, debug_output, error_output, handle_output_options, info_output, quiet?, trace?, trace_output, verb_output, verbose?, warn_output
Methods included from Execution
do_execute, last_status, popen2e
Instance Method Details
#needed_libraries(binary_paths) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Resolve dependents using llvm-readelf.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/bwrap/resolvers/library/llvm_readelf.rb', line 12 def needed_libraries binary_paths raise ArgumentError, "binary_paths is nil, expected an Array" if binary_paths.nil? trace "Finding libraries #{binary_paths} requires" @needed_libraries = [] llvm_readelf_command = %w{ llvm-readelf --needed-libs } binary_paths = convert_binary_paths binary_paths # Check if the exe is already resolved. binary_paths.delete_if do |binary_path| Bwrap::Resolvers::Library.needed_libraries_cache.include? binary_path end return [] if binary_paths.empty? data = execvalue(llvm_readelf_command + binary_paths) parse_llvm_readelf_output binary_paths, data @needed_libraries end |