MCPcopy Create free account
hub / github.com/pytorch/executorch / get_elf_dependencies

Function get_elf_dependencies

scripts/check_binary_dependencies.py:132–142  ·  view source on GitHub ↗

Get the shared object dependencies of a binary executable.

(readelf: str, binary_file: Path)

Source from the content-addressed store, hash-verified

130
131
132def 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
145def get_binary_dynamic_symbols(readelf: str, binary_file: Path) -> List[str]:

Callers 1

check_dependenciesFunction · 0.85

Calls 2

get_tool_outputFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected