[all-commits] [llvm/llvm-project] 7ca86e: [COFF] Make the autogenerated .weak.<name>.default...
Martin Storsjö via All-commits
all-commits at lists.llvm.org
Sat Dec 28 13:12:48 PST 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 7ca86ee6494d4307333b300bae80e42df4a5140f
https://github.com/llvm/llvm-project/commit/7ca86ee6494d4307333b300bae80e42df4a5140f
Author: Martin Storsjö <martin at martin.st>
Date: 2019-12-28 (Sat, 28 Dec 2019)
Changed paths:
M llvm/lib/MC/WinCOFFObjectWriter.cpp
M llvm/test/MC/COFF/weak-alias-local.s
M llvm/test/MC/COFF/weak-val.s
M llvm/test/MC/COFF/weak.s
Log Message:
-----------
[COFF] Make the autogenerated .weak.<name>.default symbols static
If we have references to the same extern_weak in multiple objects,
all of them would generate external symbols with the same name. Make
them static to avoid duplicate definitions; nothing should need to
refer to this symbol outside of the current object.
GCC/binutils seems to handle the same by not using a fixed string
for the ".default" suffix, but instead using the name of some other
defined external symbol from the same object (which is supposed to
be unique among objects unless there's other duplicate definitions).
Differential Revision: https://reviews.llvm.org/D71711
More information about the All-commits
mailing list