diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-02-28 00:10:58 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-02-28 00:10:58 +0000 |
commit | 3a4d0a7c17d90d78d299122b44576576da7d9311 (patch) | |
tree | b86319c5dc6c1b39e9a6530121a446be615af0ad /lld/lib/ReaderWriter/ELF/FileCommon.cpp | |
parent | 985ff20a9caff5091ade54ddc2e21dd8ef016194 (diff) | |
download | bcm5719-llvm-3a4d0a7c17d90d78d299122b44576576da7d9311.tar.gz bcm5719-llvm-3a4d0a7c17d90d78d299122b44576576da7d9311.zip |
Remove the old ELF linker.
I think it is clear by now that the new linker is viable.
llvm-svn: 262158
Diffstat (limited to 'lld/lib/ReaderWriter/ELF/FileCommon.cpp')
-rw-r--r-- | lld/lib/ReaderWriter/ELF/FileCommon.cpp | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/lld/lib/ReaderWriter/ELF/FileCommon.cpp b/lld/lib/ReaderWriter/ELF/FileCommon.cpp deleted file mode 100644 index c23e3f6656c..00000000000 --- a/lld/lib/ReaderWriter/ELF/FileCommon.cpp +++ /dev/null @@ -1,66 +0,0 @@ -//===- lib/ReaderWriter/ELF/FileCommon.cpp --------------------------------===// -// -// The LLVM Linker -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include "ELFFile.h" -#include "FileCommon.h" - -using namespace llvm::ELF; - -namespace lld { -namespace elf { - -static const char *elf32_expected = "ELF32 expected, but got ELF64"; -static const char *elf64_expected = "ELF64 expected, but got ELF32"; -static const char *le_expected = - "Little endian files are expected, but got a big endian file."; -static const char *be_expected = - "Big endian files are expected, but got a little endian file."; - -template <> -std::error_code checkCompatibility<ELF32LE>(unsigned char size, - unsigned char endian) { - if (size == ELFCLASS64) - return make_dynamic_error_code(elf32_expected); - if (endian == ELFDATA2MSB) - return make_dynamic_error_code(le_expected); - return std::error_code(); -} - -template <> -std::error_code checkCompatibility<ELF32BE>(unsigned char size, - unsigned char endian) { - if (size == ELFCLASS64) - return make_dynamic_error_code(elf32_expected); - if (endian == ELFDATA2LSB) - return make_dynamic_error_code(be_expected); - return std::error_code(); -} - -template <> -std::error_code checkCompatibility<ELF64LE>(unsigned char size, - unsigned char endian) { - if (size == ELFCLASS32) - return make_dynamic_error_code(elf64_expected); - if (endian == ELFDATA2MSB) - return make_dynamic_error_code(le_expected); - return std::error_code(); -} - -template <> -std::error_code checkCompatibility<ELF64BE>(unsigned char size, - unsigned char endian) { - if (size == ELFCLASS32) - return make_dynamic_error_code(elf64_expected); - if (endian == ELFDATA2LSB) - return make_dynamic_error_code(be_expected); - return std::error_code(); -} - -} // end namespace elf -} // end namespace lld |