[lld-macho][NFC] Handle GOT bindings and regular bindings more uniformly
Previously, the BindingEntry struct could only store bindings to offsets within InputSections. Since the GOTSection and TLVPointerSections are OutputSections, I handled those in a separate code path. However, this makes it awkward to support weak bindings properly without code duplication. This diff allows BindingEntries to point directly to OutputSections, simplifying the upcoming weak binding implementation. Along the way, I also converted a bunch of functions taking references to symbols to take pointers instead. Given how much casting we do for Symbol (especially in the upcoming weak binding diffs), it's cleaner this way. Differential Revision: https://reviews.llvm.org/D86571
Loading
Please sign in to comment