llvm-project/lld/MachO
Jez Ng 53eb7fda51 [lld-macho] Support binding dysyms to any section
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
2020-07-02 21:21:01 -07:00
..
Arch [lld-macho] Support binding dysyms to any section 2020-07-02 21:21:01 -07:00
CMakeLists.txt [lld] Fix shared library build by adding the missing dependency. 2020-06-08 16:12:58 -04:00
Config.h [lld-macho] Handle framework search path, alongside library search path 2020-06-17 20:41:28 -07:00
Driver.cpp lld/MachO: Remove a useless temporary 2020-07-02 00:05:43 -04:00
Driver.h [lld-macho] Specify the complete set of command-line options for ld64 2020-06-15 12:50:20 -07:00
ExportTrie.cpp [lld-macho] Use namespace qualifiers (macho::) instead of `namespace lld { namespace macho {` 2020-06-24 12:34:06 -07:00
ExportTrie.h [lld-macho] Use export trie instead of symtab when linking against dylibs 2020-05-09 20:56:22 -07:00
InputFiles.cpp [lld-macho] Ensure __bss sections we output have file offset of zero 2020-06-17 20:41:28 -07:00
InputFiles.h lld: remove old test support path 2020-06-16 15:57:58 -07:00
InputSection.cpp [lld-macho] Ensure __bss sections we output have file offset of zero 2020-06-17 20:41:28 -07:00
InputSection.h [lld-macho] Ensure __bss sections we output have file offset of zero 2020-06-17 20:41:28 -07:00
MachOStructs.h [lld-macho] Ensure reads from nlist_64 structs are aligned when necessary 2020-06-02 13:19:38 -07:00
MergedOutputSection.cpp [lld-macho] Handle alignment correctly when merging InputSections 2020-06-17 20:41:28 -07:00
MergedOutputSection.h [lld-macho] Refactor segment/section creation, sorting, and merging 2020-06-21 17:13:59 -07:00
Options.td fix a typo to cycle bots 2020-06-18 11:31:47 -04:00
OutputSection.cpp [lld-macho] Refactor segment/section creation, sorting, and merging 2020-06-21 17:13:59 -07:00
OutputSection.h [lld-macho] Refactor segment/section creation, sorting, and merging 2020-06-21 17:13:59 -07:00
OutputSegment.cpp [lld-macho] Refactor segment/section creation, sorting, and merging 2020-06-21 17:13:59 -07:00
OutputSegment.h [lld-macho] Refactor segment/section creation, sorting, and merging 2020-06-21 17:13:59 -07:00
SymbolTable.cpp [lld] Add archive file support to Mach-O backend 2020-05-14 12:58:35 -07:00
SymbolTable.h [lld] Add archive file support to Mach-O backend 2020-05-14 12:58:35 -07:00
Symbols.cpp [lld-macho] Set __PAGEZERO size to 4GB 2020-06-02 13:19:38 -07:00
Symbols.h [lld-macho] Handle GOT relocations of non-dylib symbols 2020-06-17 20:41:28 -07:00
SyntheticSections.cpp [lld-macho] Support binding dysyms to any section 2020-07-02 21:21:01 -07:00
SyntheticSections.h [lld-macho] Support binding dysyms to any section 2020-07-02 21:21:01 -07:00
Target.cpp Reland D75382 "[lld] Initial commit for new Mach-O backend" 2020-04-02 12:03:43 -07:00
Target.h [lld-macho] Support binding dysyms to any section 2020-07-02 21:21:01 -07:00
Writer.cpp [lld-macho] Support binding dysyms to any section 2020-07-02 21:21:01 -07:00
Writer.h [lld-macho] Extend SyntheticSections to cover all segment load commands 2020-04-27 12:58:12 -07:00