Strategies for finding binary dependencies
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

add symbol strategy

+19
+19
README.md
··· 75 75 Strategies — Feasible: 76 76 77 77 * [Statically analyse build recipes](#statically-analyse-build-recipes) 78 + * [Infer dependencies from symbols extracted from binaries](#infer-dependencies-from-symbols-extracted-from-binaries) 78 79 79 80 Strategies — Infeasible: 80 81 ··· 134 135 likely repository or repositories to be associated with that name. 135 136 136 137 ✨ **Implementation:** I've started an implementation of this approach in the [meson](./meson) directory. 138 + 139 + ### Infer dependencies from symbols extracted from binaries 140 + 141 + Code that has binary dependencies calls into these dependencies using specific symbols. For example, numpy might 142 + look at the compiled dynamic library `libscipy_openblas64_-8fb3d286.so` for the symbol 143 + `scipy_openblas_set_num_threads64_`. 144 + 145 + How can we identify that numpy depends on `openblas64`? Searching for the `.so` dynamic library file is not reliable, 146 + not only because its filename is not predictable, but also because the calling code does not need to call into a 147 + dynamically linked `openblas64.so` file — the `openblas64` code could even be statically compiled into the same binary 148 + as the calling code. But the symbols that a library is made up of, such as `scipy_openblas_set_num_threads64_`, _would_ 149 + probably collectively correctly identify the library. 150 + 151 + This strategy is very universally applicable. It would, however, require building some kind of index mapping symbols to 152 + the libraries they belong to. 153 + 154 + ✨ **Implementation:** For a lot more detail on this strategy, see [ecosyste-ms/packages#1261][eco-1261] 137 155 138 156 ## Strategies — Infeasible 139 157 ··· 216 234 [cmake]: https://cmake.org/cmake/help/latest/manual/cmake.1.html 217 235 [docker-file]: https://github.com/sissbruecker/linkding/blob/master/docker/default.Dockerfile 218 236 [docker]: https://www.docker.com/ 237 + [eco-1261]: https://github.com/ecosyste-ms/packages/issues/1261 219 238 [endowment]: https://endowment.dev 220 239 [eslint]: https://eslint.org/ 221 240 [ffi]: https://en.wikipedia.org/wiki/Foreign_function_interface