diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2017-05-03 19:23:30 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2017-05-03 19:23:30 +0000 |
| commit | 1c697e99b6628612be86e00b5411c9c39afd798d (patch) | |
| tree | 0f295950cc230971d561fca316d8ed36ff6c870d | |
| parent | 4c1104e199358653a77a85a3eb89e6c45ff73973 (diff) | |
| download | bcm5719-llvm-1c697e99b6628612be86e00b5411c9c39afd798d.tar.gz bcm5719-llvm-1c697e99b6628612be86e00b5411c9c39afd798d.zip | |
Revert r301897, "ELF: Set symbol binding to STB_GLOBAL when undefining symbols during LTO."
It doesn't matter what binding we store in a non-UsedInRegularObj undefined
symbol because we should reset it when we see a real undefined symbol in
a combined LTO object. The fact that we weren't doing so before is a bug
(PR32899) which is now fixed.
llvm-svn: 302067
| -rw-r--r-- | lld/ELF/LTO.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp index de0d45bea1c..dd435173101 100644 --- a/lld/ELF/LTO.cpp +++ b/lld/ELF/LTO.cpp @@ -105,11 +105,6 @@ BitcodeCompiler::~BitcodeCompiler() = default; static void undefine(Symbol *S) { replaceBody<Undefined>(S, S->body()->getName(), /*IsLocal=*/false, STV_DEFAULT, S->body()->Type, nullptr); - // It shouldn't normally matter what the binding is, but if a bug in the LTO - // implementation causes it to fail to provide a definition for a symbol, - // setting the binding to STB_GLOBAL will cause the linker to report an - // undefined symbol error, even if the definition was weak. - S->Binding = STB_GLOBAL; } void BitcodeCompiler::add(BitcodeFile &F) { |

