[PATCH] D86571: [lld-macho][NFC] Handle GOT bindings and regular bindings more uniformly
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 13:20:24 PDT 2020
int3 created this revision.
int3 added a reviewer: lld-macho.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
int3 requested review of this revision.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D86571
Files:
lld/MachO/Arch/X86_64.cpp
lld/MachO/SyntheticSections.cpp
lld/MachO/SyntheticSections.h
lld/MachO/Target.h
lld/MachO/Writer.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86571.287763.patch
Type: text/x-patch
Size: 12010 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200825/586bbf9f/attachment.bin>
More information about the llvm-commits
mailing list