[ELF] - Replaced hardcode with named constants. NFC.

llvm-svn: 272129
This commit is contained in:
George Rimar 2016-06-08 11:40:24 +00:00
parent 8ba0233e46
commit d50a1459e9
2 changed files with 3 additions and 3 deletions

View File

@ -532,7 +532,8 @@ template <class ELFT> void SharedFile<ELFT>::parseRest() {
if (Versym) {
// Ignore local symbols and non-default versions.
if (VersymIndex == 0 || VersymIndex == 1 || (VersymIndex & VERSYM_HIDDEN))
if (VersymIndex == VER_NDX_LOCAL || VersymIndex == VER_NDX_GLOBAL ||
(VersymIndex & VERSYM_HIDDEN))
continue;
}
elf::Symtab<ELFT>::X->addShared(this, Name, Sym, Verdefs[VersymIndex]);

View File

@ -1430,8 +1430,7 @@ template <class ELFT> void VersionTableSection<ELFT>::writeTo(uint8_t *Buf) {
if (auto *SS = dyn_cast<SharedSymbol<ELFT>>(P.first))
OutVersym->vs_index = SS->VersionId;
else
// The reserved identifier for a non-versioned global symbol.
OutVersym->vs_index = 1;
OutVersym->vs_index = VER_NDX_GLOBAL;
++OutVersym;
}
}