aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorJez Ng <jezng@fb.com>2020-12-15 21:05:06 -0500
committerJez Ng <jezng@fb.com>2020-12-17 08:49:16 -0500
commit811444d7a173e696f975f8d41626f6809439f726 (patch)
tree4c1dc539c99c61b622309a222d63a743c94a2b7b /clang/lib/CodeGen/CodeGenModule.cpp
parentc5046ebdf6e4be9300677c538ecaa61648c31248 (diff)
downloadllvm-811444d7a173e696f975f8d41626f6809439f726.zip
llvm-811444d7a173e696f975f8d41626f6809439f726.tar.gz
llvm-811444d7a173e696f975f8d41626f6809439f726.tar.bz2
[lld-macho] Add support for weak references
Weak references need not necessarily be satisfied at runtime (but they must still be satisfied at link time). So symbol resolution still works as per usual, but we now pass around a flag -- ultimately emitting it in the bind table -- to indicate if a given dylib symbol is a weak reference. ld64's behavior for symbols that have both weak and strong references is a bit bizarre. For non-function symbols, it will emit a weak import. For function symbols (those referenced by BRANCH relocs), it will emit a regular import. I'm not sure what value there is in that behavior, and since emulating it will make our implementation more complex, I've decided to treat regular weakrefs like function symbol ones for now. Fixes PR48511. Reviewed By: #lld-macho, thakis Differential Revision: https://reviews.llvm.org/D93369
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions