Get the shared object dependencies of a binary executable.
(readelf: str, binary_file: Path)
| 130 | |
| 131 | |
| 132 | def get_elf_dependencies(readelf: str, binary_file: Path) -> List[str]: |
| 133 | """Get the shared object dependencies of a binary executable.""" |
| 134 | shared_objects = [] |
| 135 | output = get_tool_output([readelf, "-d", binary_file]) |
| 136 | for line in output.splitlines(): |
| 137 | match = re.search(READELF_DEP_REGEX, line) |
| 138 | if not match: |
| 139 | continue |
| 140 | shared_objects.append(match.group("so")) |
| 141 | |
| 142 | return shared_objects |
| 143 | |
| 144 | |
| 145 | def get_binary_dynamic_symbols(readelf: str, binary_file: Path) -> List[str]: |
no test coverage detected