Get the dynamic symbols required by a binary executable.
(readelf: str, binary_file: Path)
| 143 | |
| 144 | |
| 145 | def 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 | |
| 157 | def demangle_symbols(cxxfilt: str, mangled_symbols: Iterable[Symbol]) -> None: |
no test coverage detected