forked from OSchip/llvm-project
[ELF] Remove config->relocatable condition from Symbol::computeBinding
This commit is contained in:
parent
b3cc47006b
commit
c0fc09ab91
|
@ -268,8 +268,6 @@ MemoryBufferRef LazyArchive::getMemberBuffer() {
|
|||
}
|
||||
|
||||
uint8_t Symbol::computeBinding() const {
|
||||
if (config->relocatable)
|
||||
return binding;
|
||||
if ((visibility != STV_DEFAULT && visibility != STV_PROTECTED) ||
|
||||
(versionId == VER_NDX_LOCAL && !isLazy()))
|
||||
return STB_LOCAL;
|
||||
|
|
|
@ -1972,7 +1972,8 @@ template <class ELFT> void Writer<ELFT>::finalizeSections() {
|
|||
for (Symbol *sym : symtab->symbols()) {
|
||||
if (!sym->isUsedInRegularObj || !includeInSymtab(*sym))
|
||||
continue;
|
||||
sym->binding = sym->computeBinding();
|
||||
if (!config->relocatable)
|
||||
sym->binding = sym->computeBinding();
|
||||
if (in.symTab)
|
||||
in.symTab->addSymbol(sym);
|
||||
|
||||
|
|
Loading…
Reference in New Issue