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

Function get_binary_dynamic_symbols

scripts/check_binary_dependencies.py:145–154  ·  view source on GitHub ↗

Get the dynamic symbols required by a binary executable.

(readelf: str, binary_file: Path)

Source from the content-addressed store, hash-verified

143
144
145def get_binary_dynamic_symbols(readelf: str, binary_file: Path) -> List[str]:
146 """Get the dynamic symbols required by a binary executable."""
147 dynamic_symbols = []
148 output = get_tool_output([readelf, "--dyn-syms", "--wide", binary_file])
149 for line in output.splitlines():
150 match = re.search(READELF_DYN_SYM_REGEX, line)
151 if not match:
152 continue
153 dynamic_symbols.append(match.group("symbol"))
154 return list(set(dynamic_symbols))
155
156
157def demangle_symbols(cxxfilt: str, mangled_symbols: Iterable[Symbol]) -> None:

Callers 1

check_dynamicFunction · 0.85

Calls 2

get_tool_outputFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected