forked from OSchip/llvm-project
Make getSymbolBinding a local static. NFC.
llvm-svn: 265791
This commit is contained in:
parent
5a7723c7a2
commit
badd397aa7
|
|
@ -1372,6 +1372,15 @@ static bool sortMipsSymbols(const std::pair<SymbolBody *, unsigned> &L,
|
|||
return L.first->GotIndex < R.first->GotIndex;
|
||||
}
|
||||
|
||||
static uint8_t getSymbolBinding(SymbolBody *Body) {
|
||||
uint8_t Visibility = Body->getVisibility();
|
||||
if (Visibility != STV_DEFAULT && Visibility != STV_PROTECTED)
|
||||
return STB_LOCAL;
|
||||
if (Config->NoGnuUnique && Body->Binding == STB_GNU_UNIQUE)
|
||||
return STB_GLOBAL;
|
||||
return Body->Binding;
|
||||
}
|
||||
|
||||
template <class ELFT> void SymbolTableSection<ELFT>::finalize() {
|
||||
if (this->Header.sh_size)
|
||||
return; // Already finalized.
|
||||
|
|
@ -1512,16 +1521,6 @@ SymbolTableSection<ELFT>::getOutputSection(SymbolBody *Sym) {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
template <class ELFT>
|
||||
uint8_t SymbolTableSection<ELFT>::getSymbolBinding(SymbolBody *Body) {
|
||||
uint8_t Visibility = Body->getVisibility();
|
||||
if (Visibility != STV_DEFAULT && Visibility != STV_PROTECTED)
|
||||
return STB_LOCAL;
|
||||
if (Config->NoGnuUnique && Body->Binding == STB_GNU_UNIQUE)
|
||||
return STB_GLOBAL;
|
||||
return Body->Binding;
|
||||
}
|
||||
|
||||
template <class ELFT>
|
||||
BuildIdSection<ELFT>::BuildIdSection(size_t HashSize)
|
||||
: OutputSectionBase<ELFT>(".note.gnu.build-id", SHT_NOTE, SHF_ALLOC),
|
||||
|
|
|
|||
|
|
@ -217,7 +217,6 @@ private:
|
|||
void writeGlobalSymbols(uint8_t *Buf);
|
||||
|
||||
const OutputSectionBase<ELFT> *getOutputSection(SymbolBody *Sym);
|
||||
static uint8_t getSymbolBinding(SymbolBody *Body);
|
||||
|
||||
SymbolTable<ELFT> &Table;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue