[PATCH] D83103: [lld-macho] Support binding dysyms to any section
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 2 16:13:16 PDT 2020
int3 created this revision.
int3 added a reviewer: lld-macho.
Herald added subscribers: llvm-commits, mgrang.
Herald added a project: LLVM.
int3 updated this revision to Diff 275255.
int3 added a comment.
int3 updated this revision to Diff 275256.
update
int3 added a comment.
more const
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).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83103
Files:
lld/MachO/Arch/X86_64.cpp
lld/MachO/SyntheticSections.cpp
lld/MachO/SyntheticSections.h
lld/MachO/Target.h
lld/MachO/Writer.cpp
lld/test/MachO/dylink.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83103.275256.patch
Type: text/x-patch
Size: 13485 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200702/99da2cf7/attachment.bin>
More information about the llvm-commits
mailing list