[PATCH] D107027: [lld-macho] Support common symbols in bitcode (but differently from ld64)
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 28 21:18:48 PDT 2021
int3 created this revision.
int3 added a reviewer: lld-macho.
Herald added subscribers: ormris, steven_wu, hiraditya.
Herald added a reviewer: gkm.
Herald added a project: lld-macho.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
ld64 seems to handle common symbols in bitcode rather
bizarrely. They follow entirely different precedence rules from their
non-bitcode counterparts. I initially tried to emulate ld64 in D106597 <https://reviews.llvm.org/D106597>,
but I'm not sure the extra complexity is worth it, especially given that
common symbols are not, well, very common.
This diff accords common bitcode symbols the same precedence as regular
common symbols, just as we treat all other pairs of bitcode and
non-bitcode symbol types. The tests document ld64's behavior in detail,
just in case we want to revisit this.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D107027
Files:
lld/MachO/InputFiles.cpp
lld/test/MachO/lto-common-symbol-coalescing.ll
lld/test/MachO/lto-common-symbol-resolution.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107027.362623.patch
Type: text/x-patch
Size: 10881 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210729/820a5d8a/attachment.bin>
More information about the llvm-commits
mailing list