[lld] r275674 - Rename SymbolVersions VersionDefinitions.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 15 21:09:27 PDT 2016
Author: ruiu
Date: Fri Jul 15 23:09:27 2016
New Revision: 275674
URL: http://llvm.org/viewvc/llvm-project?rev=275674&view=rev
Log:
Rename SymbolVersions VersionDefinitions.
SymbolVersions sounds like it had versions for a symbol, so rename it.
Modified:
lld/trunk/ELF/Config.h
lld/trunk/ELF/OutputSections.cpp
lld/trunk/ELF/SymbolListFile.cpp
lld/trunk/ELF/SymbolTable.cpp
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Config.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Config.h?rev=275674&r1=275673&r2=275674&view=diff
==============================================================================
--- lld/trunk/ELF/Config.h (original)
+++ lld/trunk/ELF/Config.h Fri Jul 15 23:09:27 2016
@@ -64,7 +64,7 @@ struct Configuration {
llvm::StringRef Sysroot;
llvm::StringSet<> TraceSymbol;
std::string RPath;
- std::vector<VersionDefinition> SymbolVersions;
+ std::vector<VersionDefinition> VersionDefinitions;
std::vector<llvm::StringRef> DynamicList;
std::vector<llvm::StringRef> SearchPaths;
std::vector<llvm::StringRef> Undefined;
Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=275674&r1=275673&r2=275674&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Fri Jul 15 23:09:27 2016
@@ -605,7 +605,7 @@ void GnuHashTableSection<ELFT>::addSymbo
// Returns the number of version definition entries. Because the first entry
// is for the version definition itself, it is the number of versioned symbols
// plus one. Note that we don't support multiple versions yet.
-static unsigned getVerDefNum() { return Config->SymbolVersions.size() + 1; }
+static unsigned getVerDefNum() { return Config->VersionDefinitions.size() + 1; }
template <class ELFT>
DynamicSection<ELFT>::DynamicSection()
@@ -1485,7 +1485,7 @@ static StringRef getFileDefName() {
template <class ELFT> void VersionDefinitionSection<ELFT>::finalize() {
FileDefNameOff = Out<ELFT>::DynStrTab->addString(getFileDefName());
- for (VersionDefinition &V : Config->SymbolVersions)
+ for (VersionDefinition &V : Config->VersionDefinitions)
V.NameOff = Out<ELFT>::DynStrTab->addString(V.Name);
this->Header.sh_size =
@@ -1519,7 +1519,7 @@ template <class ELFT>
void VersionDefinitionSection<ELFT>::writeTo(uint8_t *Buf) {
writeOne(Buf, 1, getFileDefName(), FileDefNameOff);
- for (VersionDefinition &V : Config->SymbolVersions) {
+ for (VersionDefinition &V : Config->VersionDefinitions) {
Buf += sizeof(Elf_Verdef) + sizeof(Elf_Verdaux);
writeOne(Buf, V.Id, V.Name, V.NameOff);
}
Modified: lld/trunk/ELF/SymbolListFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolListFile.cpp?rev=275674&r1=275673&r2=275674&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolListFile.cpp (original)
+++ lld/trunk/ELF/SymbolListFile.cpp Fri Jul 15 23:09:27 2016
@@ -77,8 +77,8 @@ private:
size_t elf::defineSymbolVersion(StringRef VerStr) {
// Identifiers start at 2 because 0 and 1 are reserved
// for VER_NDX_LOCAL and VER_NDX_GLOBAL constants.
- size_t VersionId = Config->SymbolVersions.size() + 2;
- Config->SymbolVersions.push_back({VerStr, VersionId});
+ size_t VersionId = Config->VersionDefinitions.size() + 2;
+ Config->VersionDefinitions.push_back({VerStr, VersionId});
return VersionId;
}
@@ -111,7 +111,7 @@ void VersionScriptParser::parseGlobal(St
if (VerStr.empty())
Globals = &Config->VersionScriptGlobals;
else
- Globals = &Config->SymbolVersions.back().Globals;
+ Globals = &Config->VersionDefinitions.back().Globals;
for (;;) {
StringRef Cur = peek();
Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=275674&r1=275673&r2=275674&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Fri Jul 15 23:09:27 2016
@@ -180,7 +180,7 @@ static uint16_t getVersionId(Symbol *Sym
if (Default)
Version = Version.drop_front();
- for (VersionDefinition &V : Config->SymbolVersions)
+ for (VersionDefinition &V : Config->VersionDefinitions)
if (V.Name == Version)
return Default ? V.Id : (V.Id | VERSYM_HIDDEN);
@@ -579,7 +579,7 @@ template <class ELFT> void SymbolTable<E
return;
}
- if (Config->SymbolVersions.empty())
+ if (Config->VersionDefinitions.empty())
return;
// If we have symbols version declarations, we should
@@ -589,8 +589,8 @@ template <class ELFT> void SymbolTable<E
// * Otherwise, we look through the wildcard patterns. We look through the
// version tags in reverse order. We use the first match we find (the last
// matching version tag in the file).
- for (size_t I = 0, E = Config->SymbolVersions.size(); I < E; ++I) {
- VersionDefinition &V = Config->SymbolVersions[I];
+ for (size_t I = 0, E = Config->VersionDefinitions.size(); I < E; ++I) {
+ VersionDefinition &V = Config->VersionDefinitions[I];
for (StringRef Name : V.Globals) {
if (hasWildcard(Name))
continue;
@@ -609,8 +609,8 @@ template <class ELFT> void SymbolTable<E
}
}
- for (size_t I = Config->SymbolVersions.size() - 1; I != (size_t)-1; --I) {
- VersionDefinition &V = Config->SymbolVersions[I];
+ for (size_t I = Config->VersionDefinitions.size() - 1; I != (size_t)-1; --I) {
+ VersionDefinition &V = Config->VersionDefinitions[I];
for (StringRef Name : V.Globals)
if (hasWildcard(Name))
for (SymbolBody *B : findAll(Name))
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=275674&r1=275673&r2=275674&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Fri Jul 15 23:09:27 2016
@@ -194,7 +194,7 @@ template <class ELFT> void elf::writeRes
MipsRldMap->setSize(sizeof(uintX_t));
MipsRldMap->updateAlignment(sizeof(uintX_t));
}
- if (!Config->SymbolVersions.empty())
+ if (!Config->VersionDefinitions.empty())
VerDef.reset(new VersionDefinitionSection<ELFT>());
Out<ELFT>::Bss = &Bss;
More information about the llvm-commits
mailing list