[lld] r262159 - Rename elf2 to elf.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 27 16:25:55 PST 2016
Author: rafael
Date: Sat Feb 27 18:25:54 2016
New Revision: 262159
URL: http://llvm.org/viewvc/llvm-project?rev=262159&view=rev
Log:
Rename elf2 to elf.
Modified:
lld/trunk/ELF/CMakeLists.txt
lld/trunk/ELF/Config.h
lld/trunk/ELF/Driver.cpp
lld/trunk/ELF/Driver.h
lld/trunk/ELF/DriverUtils.cpp
lld/trunk/ELF/Error.cpp
lld/trunk/ELF/Error.h
lld/trunk/ELF/ICF.cpp
lld/trunk/ELF/ICF.h
lld/trunk/ELF/InputFiles.cpp
lld/trunk/ELF/InputFiles.h
lld/trunk/ELF/InputSection.cpp
lld/trunk/ELF/InputSection.h
lld/trunk/ELF/LinkerScript.cpp
lld/trunk/ELF/LinkerScript.h
lld/trunk/ELF/MarkLive.cpp
lld/trunk/ELF/OutputSections.cpp
lld/trunk/ELF/OutputSections.h
lld/trunk/ELF/README.md
lld/trunk/ELF/SymbolTable.cpp
lld/trunk/ELF/SymbolTable.h
lld/trunk/ELF/Symbols.cpp
lld/trunk/ELF/Symbols.h
lld/trunk/ELF/Target.cpp
lld/trunk/ELF/Target.h
lld/trunk/ELF/Writer.cpp
lld/trunk/ELF/Writer.h
lld/trunk/include/lld/Driver/Driver.h
lld/trunk/lib/Driver/CMakeLists.txt
lld/trunk/lib/Driver/UniversalDriver.cpp
Modified: lld/trunk/ELF/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/CMakeLists.txt?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/CMakeLists.txt (original)
+++ lld/trunk/ELF/CMakeLists.txt Sat Feb 27 18:25:54 2016
@@ -2,7 +2,7 @@ set(LLVM_TARGET_DEFINITIONS Options.td)
tablegen(LLVM Options.inc -gen-opt-parser-defs)
add_public_tablegen_target(ELFOptionsTableGen)
-add_lld_library(lldELF2
+add_lld_library(lldELF
Driver.cpp
DriverUtils.cpp
Error.cpp
@@ -24,4 +24,4 @@ add_lld_library(lldELF2
Support
)
-add_dependencies(lldELF2 ELFOptionsTableGen)
+add_dependencies(lldELF ELFOptionsTableGen)
Modified: lld/trunk/ELF/Config.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Config.h?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/Config.h (original)
+++ lld/trunk/ELF/Config.h Sat Feb 27 18:25:54 2016
@@ -17,7 +17,7 @@
#include <vector>
namespace lld {
-namespace elf2 {
+namespace elf {
class InputFile;
class SymbolBody;
@@ -88,7 +88,7 @@ struct Configuration {
// The only instance of Configuration struct.
extern Configuration *Config;
-} // namespace elf2
+} // namespace elf
} // namespace lld
#endif
Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Sat Feb 27 18:25:54 2016
@@ -27,12 +27,12 @@ using namespace llvm::ELF;
using namespace llvm::object;
using namespace lld;
-using namespace lld::elf2;
+using namespace lld::elf;
-Configuration *elf2::Config;
-LinkerDriver *elf2::Driver;
+Configuration *elf::Config;
+LinkerDriver *elf::Driver;
-bool elf2::link(ArrayRef<const char *> Args, raw_ostream &Error) {
+bool elf::link(ArrayRef<const char *> Args, raw_ostream &Error) {
HasError = false;
ErrorOS = &Error;
Configuration C;
Modified: lld/trunk/ELF/Driver.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.h?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.h (original)
+++ lld/trunk/ELF/Driver.h Sat Feb 27 18:25:54 2016
@@ -17,7 +17,7 @@
#include "llvm/Support/raw_ostream.h"
namespace lld {
-namespace elf2 {
+namespace elf {
extern class LinkerDriver *Driver;
@@ -57,7 +57,7 @@ std::string findFromSearchPaths(StringRe
std::string searchLibrary(StringRef Path);
std::string buildSysrootedPath(llvm::StringRef Dir, llvm::StringRef File);
-} // namespace elf2
+} // namespace elf
} // namespace lld
#endif
Modified: lld/trunk/ELF/DriverUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/DriverUtils.cpp?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/DriverUtils.cpp (original)
+++ lld/trunk/ELF/DriverUtils.cpp Sat Feb 27 18:25:54 2016
@@ -24,7 +24,7 @@
using namespace llvm;
using namespace lld;
-using namespace lld::elf2;
+using namespace lld::elf;
// Create OptTable
@@ -51,8 +51,8 @@ public:
};
// Parses a given list of options.
-opt::InputArgList elf2::parseArgs(llvm::BumpPtrAllocator *A,
- ArrayRef<const char *> Argv) {
+opt::InputArgList elf::parseArgs(llvm::BumpPtrAllocator *A,
+ ArrayRef<const char *> Argv) {
// Make InputArgList from string vectors.
ELFOptTable Table;
unsigned MissingIndex;
@@ -78,7 +78,7 @@ opt::InputArgList elf2::parseArgs(llvm::
return Args;
}
-std::string elf2::findFromSearchPaths(StringRef Path) {
+std::string elf::findFromSearchPaths(StringRef Path) {
for (StringRef Dir : Config->SearchPaths) {
std::string FullPath = buildSysrootedPath(Dir, Path);
if (sys::fs::exists(FullPath))
@@ -89,7 +89,7 @@ std::string elf2::findFromSearchPaths(St
// Searches a given library from input search paths, which are filled
// from -L command line switches. Returns a path to an existent library file.
-std::string elf2::searchLibrary(StringRef Path) {
+std::string elf::searchLibrary(StringRef Path) {
std::vector<std::string> Names;
if (Path[0] == ':') {
Names.push_back(Path.drop_front());
@@ -109,7 +109,7 @@ std::string elf2::searchLibrary(StringRe
// Makes a path by concatenating Dir and File.
// If Dir starts with '=' the result will be preceded by Sysroot,
// which can be set with --sysroot command line switch.
-std::string elf2::buildSysrootedPath(StringRef Dir, StringRef File) {
+std::string elf::buildSysrootedPath(StringRef Dir, StringRef File) {
SmallString<128> Path;
if (Dir.startswith("="))
sys::path::append(Path, Config->Sysroot, Dir.substr(1), File);
Modified: lld/trunk/ELF/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Error.cpp?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/Error.cpp (original)
+++ lld/trunk/ELF/Error.cpp Sat Feb 27 18:25:54 2016
@@ -14,7 +14,7 @@
#include "llvm/Support/raw_ostream.h"
namespace lld {
-namespace elf2 {
+namespace elf {
bool HasError;
llvm::raw_ostream *ErrorOS;
@@ -60,5 +60,5 @@ void fatal(std::error_code EC) {
fatal(EC.message());
}
-} // namespace elf2
+} // namespace elf
} // namespace lld
Modified: lld/trunk/ELF/Error.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Error.h?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/Error.h (original)
+++ lld/trunk/ELF/Error.h Sat Feb 27 18:25:54 2016
@@ -17,7 +17,7 @@ class raw_ostream;
}
namespace lld {
-namespace elf2 {
+namespace elf {
extern bool HasError;
extern llvm::raw_ostream *ErrorOS;
@@ -47,7 +47,7 @@ template <typename T> void fatal(const E
template <typename T> void fatal(const ErrorOr<T> &V) { fatal(V.getError()); }
-} // namespace elf2
+} // namespace elf
} // namespace lld
#endif
Modified: lld/trunk/ELF/ICF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/ICF.cpp?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/ICF.cpp (original)
+++ lld/trunk/ELF/ICF.cpp Sat Feb 27 18:25:54 2016
@@ -66,13 +66,13 @@
#include "llvm/Support/raw_ostream.h"
using namespace lld;
-using namespace lld::elf2;
+using namespace lld::elf;
using namespace llvm;
using namespace llvm::ELF;
using namespace llvm::object;
namespace lld {
-namespace elf2 {
+namespace elf {
template <class ELFT> class ICF {
typedef typename ELFFile<ELFT>::Elf_Shdr Elf_Shdr;
typedef typename ELFFile<ELFT>::Elf_Sym Elf_Sym;
@@ -361,11 +361,11 @@ template <class ELFT> void ICF<ELFT>::ru
}
// ICF entry point function.
-template <class ELFT> void elf2::doIcf(SymbolTable<ELFT> *Symtab) {
+template <class ELFT> void elf::doIcf(SymbolTable<ELFT> *Symtab) {
ICF<ELFT>().run(Symtab);
}
-template void elf2::doIcf(SymbolTable<ELF32LE> *);
-template void elf2::doIcf(SymbolTable<ELF32BE> *);
-template void elf2::doIcf(SymbolTable<ELF64LE> *);
-template void elf2::doIcf(SymbolTable<ELF64BE> *);
+template void elf::doIcf(SymbolTable<ELF32LE> *);
+template void elf::doIcf(SymbolTable<ELF32BE> *);
+template void elf::doIcf(SymbolTable<ELF64LE> *);
+template void elf::doIcf(SymbolTable<ELF64BE> *);
Modified: lld/trunk/ELF/ICF.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/ICF.h?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/ICF.h (original)
+++ lld/trunk/ELF/ICF.h Sat Feb 27 18:25:54 2016
@@ -11,7 +11,7 @@
#define LLD_ELF_ICF_H
namespace lld {
-namespace elf2 {
+namespace elf {
template <class ELFT> class SymbolTable;
Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Sat Feb 27 18:25:54 2016
@@ -22,7 +22,7 @@ using namespace llvm::object;
using namespace llvm::sys::fs;
using namespace lld;
-using namespace lld::elf2;
+using namespace lld::elf;
namespace {
class ECRAII {
@@ -86,24 +86,24 @@ ELFFileBase<ELFT>::getNonLocalSymbols()
}
template <class ELFT>
-elf2::ObjectFile<ELFT>::ObjectFile(MemoryBufferRef M)
+elf::ObjectFile<ELFT>::ObjectFile(MemoryBufferRef M)
: ELFFileBase<ELFT>(Base::ObjectKind, M) {}
template <class ELFT>
-typename elf2::ObjectFile<ELFT>::Elf_Sym_Range
-elf2::ObjectFile<ELFT>::getLocalSymbols() {
+typename elf::ObjectFile<ELFT>::Elf_Sym_Range
+elf::ObjectFile<ELFT>::getLocalSymbols() {
return this->getSymbolsHelper(true);
}
-template <class ELFT> uint32_t elf2::ObjectFile<ELFT>::getMipsGp0() const {
+template <class ELFT> uint32_t elf::ObjectFile<ELFT>::getMipsGp0() const {
if (MipsReginfo)
return MipsReginfo->Reginfo->ri_gp_value;
return 0;
}
template <class ELFT>
-const typename elf2::ObjectFile<ELFT>::Elf_Sym *
-elf2::ObjectFile<ELFT>::getLocalSymbol(uintX_t SymIndex) {
+const typename elf::ObjectFile<ELFT>::Elf_Sym *
+elf::ObjectFile<ELFT>::getLocalSymbol(uintX_t SymIndex) {
uint32_t FirstNonLocal = this->Symtab->sh_info;
if (SymIndex >= FirstNonLocal)
return nullptr;
@@ -112,7 +112,7 @@ elf2::ObjectFile<ELFT>::getLocalSymbol(u
}
template <class ELFT>
-void elf2::ObjectFile<ELFT>::parse(DenseSet<StringRef> &ComdatGroups) {
+void elf::ObjectFile<ELFT>::parse(DenseSet<StringRef> &ComdatGroups) {
// Read section and symbol tables.
initializeSections(ComdatGroups);
initializeSymbols();
@@ -122,7 +122,7 @@ void elf2::ObjectFile<ELFT>::parse(Dense
// They are identified and deduplicated by group name. This function
// returns a group name.
template <class ELFT>
-StringRef elf2::ObjectFile<ELFT>::getShtGroupSignature(const Elf_Shdr &Sec) {
+StringRef elf::ObjectFile<ELFT>::getShtGroupSignature(const Elf_Shdr &Sec) {
const ELFFile<ELFT> &Obj = this->ELFObj;
uint32_t SymtabdSectionIndex = Sec.sh_link;
ErrorOr<const Elf_Shdr *> SecOrErr = Obj.getSection(SymtabdSectionIndex);
@@ -138,8 +138,8 @@ StringRef elf2::ObjectFile<ELFT>::getSht
}
template <class ELFT>
-ArrayRef<typename elf2::ObjectFile<ELFT>::uint32_X>
-elf2::ObjectFile<ELFT>::getShtGroupEntries(const Elf_Shdr &Sec) {
+ArrayRef<typename elf::ObjectFile<ELFT>::uint32_X>
+elf::ObjectFile<ELFT>::getShtGroupEntries(const Elf_Shdr &Sec) {
const ELFFile<ELFT> &Obj = this->ELFObj;
ErrorOr<ArrayRef<uint32_X>> EntriesOrErr =
Obj.template getSectionContentsAsArray<uint32_X>(&Sec);
@@ -178,7 +178,7 @@ static bool shouldMerge(const typename E
}
template <class ELFT>
-void elf2::ObjectFile<ELFT>::initializeSections(
+void elf::ObjectFile<ELFT>::initializeSections(
DenseSet<StringRef> &ComdatGroups) {
uint64_t Size = this->ELFObj.getNumSections();
Sections.resize(Size);
@@ -248,7 +248,7 @@ void elf2::ObjectFile<ELFT>::initializeS
template <class ELFT>
InputSectionBase<ELFT> *
-elf2::ObjectFile<ELFT>::createInputSection(const Elf_Shdr &Sec) {
+elf::ObjectFile<ELFT>::createInputSection(const Elf_Shdr &Sec) {
ErrorOr<StringRef> NameOrErr = this->ELFObj.getSectionName(&Sec);
fatal(NameOrErr);
StringRef Name = *NameOrErr;
@@ -274,7 +274,7 @@ elf2::ObjectFile<ELFT>::createInputSecti
return new (Alloc) InputSection<ELFT>(this, &Sec);
}
-template <class ELFT> void elf2::ObjectFile<ELFT>::initializeSymbols() {
+template <class ELFT> void elf::ObjectFile<ELFT>::initializeSymbols() {
this->initStringTable();
Elf_Sym_Range Syms = this->getNonLocalSymbols();
uint32_t NumSymbols = std::distance(Syms.begin(), Syms.end());
@@ -285,7 +285,7 @@ template <class ELFT> void elf2::ObjectF
template <class ELFT>
InputSectionBase<ELFT> *
-elf2::ObjectFile<ELFT>::getSection(const Elf_Sym &Sym) const {
+elf::ObjectFile<ELFT>::getSection(const Elf_Sym &Sym) const {
uint32_t Index = this->getSectionIndex(Sym);
if (Index == 0)
return nullptr;
@@ -298,7 +298,7 @@ elf2::ObjectFile<ELFT>::getSection(const
}
template <class ELFT>
-SymbolBody *elf2::ObjectFile<ELFT>::createSymbolBody(const Elf_Sym *Sym) {
+SymbolBody *elf::ObjectFile<ELFT>::createSymbolBody(const Elf_Sym *Sym) {
ErrorOr<StringRef> NameOrErr = Sym->getName(this->StringTable);
fatal(NameOrErr);
StringRef Name = *NameOrErr;
@@ -497,8 +497,8 @@ static std::unique_ptr<InputFile> create
fatal("Invalid file class: " + MB.getBufferIdentifier());
}
-std::unique_ptr<InputFile> elf2::createObjectFile(MemoryBufferRef MB,
- StringRef ArchiveName) {
+std::unique_ptr<InputFile> elf::createObjectFile(MemoryBufferRef MB,
+ StringRef ArchiveName) {
using namespace sys::fs;
std::unique_ptr<InputFile> F;
if (identify_magic(MB.getBuffer()) == file_magic::bitcode)
@@ -509,21 +509,21 @@ std::unique_ptr<InputFile> elf2::createO
return F;
}
-std::unique_ptr<InputFile> elf2::createSharedFile(MemoryBufferRef MB) {
+std::unique_ptr<InputFile> elf::createSharedFile(MemoryBufferRef MB) {
return createELFFile<SharedFile>(MB);
}
-template class elf2::ELFFileBase<ELF32LE>;
-template class elf2::ELFFileBase<ELF32BE>;
-template class elf2::ELFFileBase<ELF64LE>;
-template class elf2::ELFFileBase<ELF64BE>;
-
-template class elf2::ObjectFile<ELF32LE>;
-template class elf2::ObjectFile<ELF32BE>;
-template class elf2::ObjectFile<ELF64LE>;
-template class elf2::ObjectFile<ELF64BE>;
-
-template class elf2::SharedFile<ELF32LE>;
-template class elf2::SharedFile<ELF32BE>;
-template class elf2::SharedFile<ELF64LE>;
-template class elf2::SharedFile<ELF64BE>;
+template class elf::ELFFileBase<ELF32LE>;
+template class elf::ELFFileBase<ELF32BE>;
+template class elf::ELFFileBase<ELF64LE>;
+template class elf::ELFFileBase<ELF64BE>;
+
+template class elf::ObjectFile<ELF32LE>;
+template class elf::ObjectFile<ELF32BE>;
+template class elf::ObjectFile<ELF64LE>;
+template class elf::ObjectFile<ELF64BE>;
+
+template class elf::SharedFile<ELF32LE>;
+template class elf::SharedFile<ELF32BE>;
+template class elf::SharedFile<ELF64LE>;
+template class elf::SharedFile<ELF64BE>;
Modified: lld/trunk/ELF/InputFiles.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.h?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.h (original)
+++ lld/trunk/ELF/InputFiles.h Sat Feb 27 18:25:54 2016
@@ -23,7 +23,7 @@
#include "llvm/Support/StringSaver.h"
namespace lld {
-namespace elf2 {
+namespace elf {
using llvm::object::Archive;
@@ -231,7 +231,7 @@ std::unique_ptr<InputFile> createObjectF
StringRef ArchiveName = "");
std::unique_ptr<InputFile> createSharedFile(MemoryBufferRef MB);
-} // namespace elf2
+} // namespace elf
} // namespace lld
#endif
Modified: lld/trunk/ELF/InputSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Sat Feb 27 18:25:54 2016
@@ -22,7 +22,7 @@ using namespace llvm::object;
using namespace llvm::support::endian;
using namespace lld;
-using namespace lld::elf2;
+using namespace lld::elf;
template <class ELFT>
InputSectionBase<ELFT>::InputSectionBase(ObjectFile<ELFT> *File,
@@ -459,27 +459,27 @@ bool MipsReginfoInputSection<ELFT>::clas
return S->SectionKind == InputSectionBase<ELFT>::MipsReginfo;
}
-template class elf2::InputSectionBase<ELF32LE>;
-template class elf2::InputSectionBase<ELF32BE>;
-template class elf2::InputSectionBase<ELF64LE>;
-template class elf2::InputSectionBase<ELF64BE>;
-
-template class elf2::InputSection<ELF32LE>;
-template class elf2::InputSection<ELF32BE>;
-template class elf2::InputSection<ELF64LE>;
-template class elf2::InputSection<ELF64BE>;
-
-template class elf2::EHInputSection<ELF32LE>;
-template class elf2::EHInputSection<ELF32BE>;
-template class elf2::EHInputSection<ELF64LE>;
-template class elf2::EHInputSection<ELF64BE>;
-
-template class elf2::MergeInputSection<ELF32LE>;
-template class elf2::MergeInputSection<ELF32BE>;
-template class elf2::MergeInputSection<ELF64LE>;
-template class elf2::MergeInputSection<ELF64BE>;
-
-template class elf2::MipsReginfoInputSection<ELF32LE>;
-template class elf2::MipsReginfoInputSection<ELF32BE>;
-template class elf2::MipsReginfoInputSection<ELF64LE>;
-template class elf2::MipsReginfoInputSection<ELF64BE>;
+template class elf::InputSectionBase<ELF32LE>;
+template class elf::InputSectionBase<ELF32BE>;
+template class elf::InputSectionBase<ELF64LE>;
+template class elf::InputSectionBase<ELF64BE>;
+
+template class elf::InputSection<ELF32LE>;
+template class elf::InputSection<ELF32BE>;
+template class elf::InputSection<ELF64LE>;
+template class elf::InputSection<ELF64BE>;
+
+template class elf::EHInputSection<ELF32LE>;
+template class elf::EHInputSection<ELF32BE>;
+template class elf::EHInputSection<ELF64LE>;
+template class elf::EHInputSection<ELF64BE>;
+
+template class elf::MergeInputSection<ELF32LE>;
+template class elf::MergeInputSection<ELF32BE>;
+template class elf::MergeInputSection<ELF64LE>;
+template class elf::MergeInputSection<ELF64BE>;
+
+template class elf::MipsReginfoInputSection<ELF32LE>;
+template class elf::MipsReginfoInputSection<ELF32BE>;
+template class elf::MipsReginfoInputSection<ELF64LE>;
+template class elf::MipsReginfoInputSection<ELF64BE>;
Modified: lld/trunk/ELF/InputSection.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.h?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.h (original)
+++ lld/trunk/ELF/InputSection.h Sat Feb 27 18:25:54 2016
@@ -16,7 +16,7 @@
#include "llvm/Object/ELF.h"
namespace lld {
-namespace elf2 {
+namespace elf {
template <class ELFT> class ICF;
template <class ELFT> class ObjectFile;
@@ -202,7 +202,7 @@ public:
const llvm::object::Elf_Mips_RegInfo<ELFT> *Reginfo;
};
-} // namespace elf2
+} // namespace elf
} // namespace lld
#endif
Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Sat Feb 27 18:25:54 2016
@@ -26,9 +26,9 @@
using namespace llvm;
using namespace llvm::object;
using namespace lld;
-using namespace lld::elf2;
+using namespace lld::elf;
-LinkerScript *elf2::Script;
+LinkerScript *elf::Script;
template <class ELFT>
SectionRule *LinkerScript::find(InputSectionBase<ELFT> *S) {
@@ -103,7 +103,7 @@ template <class ELFT> bool SectionRule::
return matchStr(SectionPattern, S->getSectionName());
}
-class elf2::ScriptParser {
+class elf::ScriptParser {
typedef void (ScriptParser::*Handler)();
public:
@@ -149,7 +149,7 @@ private:
bool Error = false;
};
-const StringMap<elf2::ScriptParser::Handler> elf2::ScriptParser::Cmd = {
+const StringMap<elf::ScriptParser::Handler> elf::ScriptParser::Cmd = {
{"ENTRY", &ScriptParser::readEntry},
{"EXTERN", &ScriptParser::readExtern},
{"GROUP", &ScriptParser::readGroup},
Modified: lld/trunk/ELF/LinkerScript.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.h?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.h (original)
+++ lld/trunk/ELF/LinkerScript.h Sat Feb 27 18:25:54 2016
@@ -17,7 +17,7 @@
#include "llvm/Support/MemoryBuffer.h"
namespace lld {
-namespace elf2 {
+namespace elf {
class ScriptParser;
template <class ELFT> class InputSectionBase;
@@ -75,7 +75,7 @@ private:
extern LinkerScript *Script;
-} // namespace elf2
+} // namespace elf
} // namespace lld
#endif
Modified: lld/trunk/ELF/MarkLive.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/MarkLive.cpp?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/MarkLive.cpp (original)
+++ lld/trunk/ELF/MarkLive.cpp Sat Feb 27 18:25:54 2016
@@ -36,7 +36,7 @@ using namespace llvm::ELF;
using namespace llvm::object;
using namespace lld;
-using namespace lld::elf2;
+using namespace lld::elf;
// Calls Fn for each section that Sec refers to via relocations.
template <class ELFT>
@@ -86,7 +86,7 @@ template <class ELFT> static bool isRese
// This is the main function of the garbage collector.
// Starting from GC-root sections, this function visits all reachable
// sections to set their "Live" bits.
-template <class ELFT> void elf2::markLive(SymbolTable<ELFT> *Symtab) {
+template <class ELFT> void elf::markLive(SymbolTable<ELFT> *Symtab) {
SmallVector<InputSection<ELFT> *, 256> Q;
auto Enqueue = [&](InputSectionBase<ELFT> *Sec) {
@@ -133,7 +133,7 @@ template <class ELFT> void elf2::markLiv
forEachSuccessor<ELFT>(Q.pop_back_val(), Enqueue);
}
-template void elf2::markLive<ELF32LE>(SymbolTable<ELF32LE> *);
-template void elf2::markLive<ELF32BE>(SymbolTable<ELF32BE> *);
-template void elf2::markLive<ELF64LE>(SymbolTable<ELF64LE> *);
-template void elf2::markLive<ELF64BE>(SymbolTable<ELF64BE> *);
+template void elf::markLive<ELF32LE>(SymbolTable<ELF32LE> *);
+template void elf::markLive<ELF32BE>(SymbolTable<ELF32BE> *);
+template void elf::markLive<ELF64LE>(SymbolTable<ELF64LE> *);
+template void elf::markLive<ELF64BE>(SymbolTable<ELF64BE> *);
Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Sat Feb 27 18:25:54 2016
@@ -23,7 +23,7 @@ using namespace llvm::support::endian;
using namespace llvm::ELF;
using namespace lld;
-using namespace lld::elf2;
+using namespace lld::elf;
static bool isAlpha(char C) {
return ('a' <= C && C <= 'z') || ('A' <= C && C <= 'Z') || C == '_';
@@ -32,7 +32,7 @@ static bool isAlpha(char C) {
static bool isAlnum(char C) { return isAlpha(C) || ('0' <= C && C <= '9'); }
// Returns true if S is valid as a C language identifier.
-bool elf2::isValidCIdentifier(StringRef S) {
+bool elf::isValidCIdentifier(StringRef S) {
return !S.empty() && isAlpha(S[0]) &&
std::all_of(S.begin() + 1, S.end(), isAlnum);
}
@@ -886,9 +886,9 @@ template <class ELFT> void OutputSection
// For non-local symbols, use SymbolBody::getVA instead.
template <class ELFT, bool IsRela>
typename ELFFile<ELFT>::uintX_t
-elf2::getLocalRelTarget(const ObjectFile<ELFT> &File,
- const Elf_Rel_Impl<ELFT, IsRela> &RI,
- typename ELFFile<ELFT>::uintX_t Addend) {
+elf::getLocalRelTarget(const ObjectFile<ELFT> &File,
+ const Elf_Rel_Impl<ELFT, IsRela> &RI,
+ typename ELFFile<ELFT>::uintX_t Addend) {
typedef typename ELFFile<ELFT>::Elf_Sym Elf_Sym;
typedef typename ELFFile<ELFT>::uintX_t uintX_t;
@@ -926,7 +926,7 @@ elf2::getLocalRelTarget(const ObjectFile
// Returns true if a symbol can be replaced at load-time by a symbol
// with the same name defined in other ELF executable or DSO.
-bool elf2::canBePreempted(const SymbolBody *Body) {
+bool elf::canBePreempted(const SymbolBody *Body) {
if (!Body)
return false; // Body is a local symbol.
if (Body->isShared())
@@ -1586,7 +1586,7 @@ void MipsReginfoOutputSection<ELFT>::add
}
namespace lld {
-namespace elf2 {
+namespace elf {
template class OutputSectionBase<ELF32LE>;
template class OutputSectionBase<ELF32BE>;
template class OutputSectionBase<ELF64LE>;
Modified: lld/trunk/ELF/OutputSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.h (original)
+++ lld/trunk/ELF/OutputSections.h Sat Feb 27 18:25:54 2016
@@ -20,7 +20,7 @@
#include <type_traits>
namespace lld {
-namespace elf2 {
+namespace elf {
class SymbolBody;
template <class ELFT> class SymbolTable;
@@ -579,7 +579,7 @@ template <class ELFT> typename Out<ELFT>
template <class ELFT> OutputSectionBase<ELFT> *Out<ELFT>::ElfHeader;
template <class ELFT> OutputSectionBase<ELFT> *Out<ELFT>::ProgramHeaders;
-} // namespace elf2
+} // namespace elf
} // namespace lld
#endif // LLD_ELF_OUTPUT_SECTIONS_H
Modified: lld/trunk/ELF/README.md
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/README.md?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/README.md (original)
+++ lld/trunk/ELF/README.md Sat Feb 27 18:25:54 2016
@@ -24,7 +24,7 @@ Library Use
-----------
You can embed LLD to your program by linking against it and calling the linker's
-entry point function lld::elf2::link.
+entry point function lld::elf::link.
The current policy is that it is your reponsibility to give trustworthy object
files. The function is guaranteed to return as long as you do not pass corrupted
Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Sat Feb 27 18:25:54 2016
@@ -30,7 +30,7 @@ using namespace llvm::object;
using namespace llvm::ELF;
using namespace lld;
-using namespace lld::elf2;
+using namespace lld::elf;
// All input object files must be for the same architecture
// (e.g. it does not make sense to link x86 object files with
@@ -356,7 +356,7 @@ template <class ELFT> void SymbolTable<E
Sym->MustBeInDynSym = true;
}
-template class elf2::SymbolTable<ELF32LE>;
-template class elf2::SymbolTable<ELF32BE>;
-template class elf2::SymbolTable<ELF64LE>;
-template class elf2::SymbolTable<ELF64BE>;
+template class elf::SymbolTable<ELF32LE>;
+template class elf::SymbolTable<ELF32BE>;
+template class elf::SymbolTable<ELF64LE>;
+template class elf::SymbolTable<ELF64BE>;
Modified: lld/trunk/ELF/SymbolTable.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.h?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.h (original)
+++ lld/trunk/ELF/SymbolTable.h Sat Feb 27 18:25:54 2016
@@ -18,7 +18,7 @@ class Module;
}
namespace lld {
-namespace elf2 {
+namespace elf {
class Lazy;
template <class ELFT> class OutputSectionBase;
struct Symbol;
@@ -103,7 +103,7 @@ private:
llvm::DenseSet<StringRef> SoNames;
};
-} // namespace elf2
+} // namespace elf
} // namespace lld
#endif
Modified: lld/trunk/ELF/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.cpp?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.cpp (original)
+++ lld/trunk/ELF/Symbols.cpp Sat Feb 27 18:25:54 2016
@@ -26,7 +26,7 @@ using namespace llvm::object;
using namespace llvm::ELF;
using namespace lld;
-using namespace lld::elf2;
+using namespace lld::elf;
template <class ELFT>
typename ELFFile<ELFT>::uintX_t SymbolBody::getVA() const {
@@ -223,7 +223,7 @@ template <class ELFT> static void doInit
ElfSym<ELFT>::Ignored.setVisibility(STV_HIDDEN);
}
-void elf2::initSymbols() {
+void elf::initSymbols() {
doInitSymbols<ELF32LE>();
doInitSymbols<ELF32BE>();
doInitSymbols<ELF64LE>();
@@ -231,7 +231,7 @@ void elf2::initSymbols() {
}
// Returns the demangled C++ symbol name for Name.
-std::string elf2::demangle(StringRef Name) {
+std::string elf::demangle(StringRef Name) {
#if !defined(HAVE_CXXABI_H)
return Name;
#else
@@ -286,12 +286,12 @@ template int SymbolBody::compare<ELF32BE
template int SymbolBody::compare<ELF64LE>(SymbolBody *Other);
template int SymbolBody::compare<ELF64BE>(SymbolBody *Other);
-template class elf2::UndefinedElf<ELF32LE>;
-template class elf2::UndefinedElf<ELF32BE>;
-template class elf2::UndefinedElf<ELF64LE>;
-template class elf2::UndefinedElf<ELF64BE>;
-
-template class elf2::DefinedSynthetic<ELF32LE>;
-template class elf2::DefinedSynthetic<ELF32BE>;
-template class elf2::DefinedSynthetic<ELF64LE>;
-template class elf2::DefinedSynthetic<ELF64BE>;
+template class elf::UndefinedElf<ELF32LE>;
+template class elf::UndefinedElf<ELF32BE>;
+template class elf::UndefinedElf<ELF64LE>;
+template class elf::UndefinedElf<ELF64BE>;
+
+template class elf::DefinedSynthetic<ELF32LE>;
+template class elf::DefinedSynthetic<ELF32BE>;
+template class elf::DefinedSynthetic<ELF64LE>;
+template class elf::DefinedSynthetic<ELF64BE>;
Modified: lld/trunk/ELF/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.h?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.h (original)
+++ lld/trunk/ELF/Symbols.h Sat Feb 27 18:25:54 2016
@@ -30,7 +30,7 @@
#include "llvm/Object/ELF.h"
namespace lld {
-namespace elf2 {
+namespace elf {
class ArchiveFile;
class InputFile;
@@ -373,7 +373,7 @@ template <class ELFT>
typename ElfSym<ELFT>::Elf_Sym ElfSym<ELFT>::RelaIpltStart;
template <class ELFT> typename ElfSym<ELFT>::Elf_Sym ElfSym<ELFT>::RelaIpltEnd;
-} // namespace elf2
+} // namespace elf
} // namespace lld
#endif
Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Sat Feb 27 18:25:54 2016
@@ -31,7 +31,7 @@ using namespace llvm::support::endian;
using namespace llvm::ELF;
namespace lld {
-namespace elf2 {
+namespace elf {
TargetInfo *Target;
Modified: lld/trunk/ELF/Target.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.h?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/Target.h (original)
+++ lld/trunk/ELF/Target.h Sat Feb 27 18:25:54 2016
@@ -16,7 +16,7 @@
#include <memory>
namespace lld {
-namespace elf2 {
+namespace elf {
class SymbolBody;
class TargetInfo {
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Sat Feb 27 18:25:54 2016
@@ -26,7 +26,7 @@ using namespace llvm::ELF;
using namespace llvm::object;
using namespace lld;
-using namespace lld::elf2;
+using namespace lld::elf;
namespace {
// The writer writes a SymbolTable result to a file.
@@ -123,7 +123,7 @@ private:
template <class ELFT> static bool shouldUseRela() { return ELFT::Is64Bits; }
-template <class ELFT> void elf2::writeResult(SymbolTable<ELFT> *Symtab) {
+template <class ELFT> void elf::writeResult(SymbolTable<ELFT> *Symtab) {
typedef typename ELFFile<ELFT>::uintX_t uintX_t;
// Create singleton output sections.
@@ -1535,7 +1535,7 @@ template <class ELFT> void Writer<ELFT>:
Sec->writeTo(Buf + Sec->getFileOff());
}
-template void elf2::writeResult<ELF32LE>(SymbolTable<ELF32LE> *Symtab);
-template void elf2::writeResult<ELF32BE>(SymbolTable<ELF32BE> *Symtab);
-template void elf2::writeResult<ELF64LE>(SymbolTable<ELF64LE> *Symtab);
-template void elf2::writeResult<ELF64BE>(SymbolTable<ELF64BE> *Symtab);
+template void elf::writeResult<ELF32LE>(SymbolTable<ELF32LE> *Symtab);
+template void elf::writeResult<ELF32BE>(SymbolTable<ELF32BE> *Symtab);
+template void elf::writeResult<ELF64LE>(SymbolTable<ELF64LE> *Symtab);
+template void elf::writeResult<ELF64BE>(SymbolTable<ELF64BE> *Symtab);
Modified: lld/trunk/ELF/Writer.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.h?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.h (original)
+++ lld/trunk/ELF/Writer.h Sat Feb 27 18:25:54 2016
@@ -11,7 +11,7 @@
#define LLD_ELF_WRITER_H
namespace lld {
-namespace elf2 {
+namespace elf {
template <class ELFT> class SymbolTable;
Modified: lld/trunk/include/lld/Driver/Driver.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Driver/Driver.h?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/include/lld/Driver/Driver.h (original)
+++ lld/trunk/include/lld/Driver/Driver.h Sat Feb 27 18:25:54 2016
@@ -87,7 +87,7 @@ namespace coff {
void link(llvm::ArrayRef<const char *> args);
}
-namespace elf2 {
+namespace elf {
bool link(llvm::ArrayRef<const char *> args, raw_ostream &diag = llvm::errs());
}
Modified: lld/trunk/lib/Driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/CMakeLists.txt?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/lib/Driver/CMakeLists.txt (original)
+++ lld/trunk/lib/Driver/CMakeLists.txt Sat Feb 27 18:25:54 2016
@@ -19,7 +19,7 @@ add_lld_library(lldDriver
lldConfig
lldMachO
lldCOFF
- lldELF2
+ lldELF
lldCore
lldReaderWriter
lldYAML
Modified: lld/trunk/lib/Driver/UniversalDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/UniversalDriver.cpp?rev=262159&r1=262158&r2=262159&view=diff
==============================================================================
--- lld/trunk/lib/Driver/UniversalDriver.cpp (original)
+++ lld/trunk/lib/Driver/UniversalDriver.cpp Sat Feb 27 18:25:54 2016
@@ -201,7 +201,7 @@ bool UniversalDriver::link(llvm::Mutable
// Switch to appropriate driver.
switch (flavor) {
case Flavor::gnu_ld:
- return elf2::link(args, diagnostics);
+ return elf::link(args, diagnostics);
case Flavor::darwin_ld:
return DarwinLdDriver::linkMachO(args, diagnostics);
case Flavor::win_link:
More information about the llvm-commits
mailing list