mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-01 13:20:25 +00:00
[ELF] - Replaced hardcode with named constants. NFC.
llvm-svn: 272129
This commit is contained in:
parent
8ba0233e46
commit
d50a1459e9
@ -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]);
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user