summaryrefslogtreecommitdiffstats
path: root/lld/ELF/OutputSections.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
-rw-r--r--lld/ELF/OutputSections.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index 139e67505c7..972457ae43a 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -1316,6 +1316,8 @@ static bool sortMipsSymbols(const std::pair<SymbolBody *, unsigned> &L,
static uint8_t getSymbolBinding(SymbolBody *Body) {
Symbol *S = Body->symbol();
+ if (Config->Relocatable)
+ return S->Binding;
uint8_t Visibility = S->Visibility;
if (Visibility != STV_DEFAULT && Visibility != STV_PROTECTED)
return STB_LOCAL;
OpenPOWER on IntegriCloud