mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-10 03:13:34 +00:00
![Jez Ng](/assets/img/avatar_default.png)
Previously, we only supported binding dysyms to the GOT. This diff adds support for binding them to any arbitrary section. C++ programs appear to use this, I believe for vtables and type_info. This diff also makes our bind opcode encoding a bit smarter -- we now encode just the differences between bindings, which will make things more compact. I was initially concerned about the performance overhead of iterating over these relocations, but it turns out that the number of such relocations is small. A quick analysis of my llvm-project build directory showed that < 1.3% out of ~7M relocations are RELOC_UNSIGNED bindings to symbols (including both dynamic and static symbols). Reviewed By: #lld-macho, smeenai Differential Revision: https://reviews.llvm.org/D83103