llvm-project/lld/test/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
..
Inputs ld64.lld: Make janky support for tbd files actually work sometimes 2020-07-02 15:31:21 -04:00
invalid [lld-macho] Refactor segment/section creation, sorting, and merging 2020-06-21 17:13:59 -07:00
arch.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
archive.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
bss.s [lld-macho] Make sure ZeroFill sections are at the end of their segments 2020-07-01 19:39:29 -07:00
dylib.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
dylink-lazy.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
dylink.s [lld-macho] Support binding dysyms to any section 2020-07-02 21:21:01 -07:00
entry-symbol.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
export-trie.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
fat-arch.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
link-search-order.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
load-commands.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
local-got.s [lld-macho] Handle GOT relocations of non-dylib symbols 2020-06-17 20:41:28 -07:00
no-exports-dylib.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
order-file.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
platform-version.test [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
relocations.s [lld-macho] Support non-pcrel section relocs 2020-06-17 20:41:28 -07:00
resolution.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
search-paths-darwin.test [lld-macho] Add missing search-paths-darwin.test 2020-06-17 20:51:26 -07:00
search-paths.test [lld-macho] Handle framework search path, alongside library search path 2020-06-17 20:41:28 -07:00
section-headers.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
section-merge.s [lld-macho] Handle alignment correctly when merging InputSections 2020-06-17 20:41:28 -07:00
segments.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
silent-ignore.test [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
static-link.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
stub-link.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
sub-library.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
subsections-section-relocs.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
subsections-symbol-relocs.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
symbol-order.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
symtab.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
x86-64-reloc-signed.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00
x86-64-reloc-unsigned.s [lld-macho] Avoid explicit -arch in tests by defaulting to x86-64 2020-06-17 20:41:27 -07:00