<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Thanks for the Info. I will triage the
issue and fix it sometime soon.<br>
<br>
Shankar Easwaran<br>
<br>
On 1/30/2015 6:47 PM, Rui Ueyama wrote:<br>
</div>
<blockquote
cite="mid:CAJENXgv8KiKJqreaqXt01NYmXU0HD2=c194mM89e9kmpVSKP8A@mail.gmail.com"
type="cite">
<pre wrap="">Alright, so r227300 added a use of __thread to LLVM, and that was the first
and only line in LLVM to use that feature. I'ts a C++11 feature. LLD needs
to handle the thread local storage correctly.
For now, in order to link LLVM with LLD, you've got to set
LLVM_ENABLE_BACKTRACES=OFF to exclude that line.
On Fri, Jan 30, 2015 at 4:36 PM, Rui Ueyama <a class="moz-txt-link-rfc2396E" href="mailto:ruiu@google.com"><ruiu@google.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">It was not actually caused by this change, but by a change to LLVM
submitted almost at the same time as this change. The culprit is
r227300 - [LPM] Rip all of ManagedStatic and ThreadLocal out of the pretty
stack
Still investigating...
On Fri, Jan 30, 2015 at 3:00 PM, Rui Ueyama <a class="moz-txt-link-rfc2396E" href="mailto:ruiu@google.com"><ruiu@google.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">lld started mislinking llvm-tblgen on Linux x86-64 after this commit. I
honestly have no idea why this innocent-looking patch could cause that
failure. Do you have any idea?
On Wed, Jan 28, 2015 at 8:37 AM, Greg Fitzgerald <a class="moz-txt-link-rfc2396E" href="mailto:garious@gmail.com"><garious@gmail.com></a>
wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Author: garious
Date: Wed Jan 28 10:37:43 2015
New Revision: 227320
URL: <a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project?rev=227320&view=rev">http://llvm.org/viewvc/llvm-project?rev=227320&view=rev</a>
Log:
Remove PPC ELF target
Differential Revision: <a class="moz-txt-link-freetext" href="http://reviews.llvm.org/D7225">http://reviews.llvm.org/D7225</a>
Removed:
lld/trunk/lib/ReaderWriter/ELF/PPC/CMakeLists.txt
lld/trunk/lib/ReaderWriter/ELF/PPC/Makefile
lld/trunk/lib/ReaderWriter/ELF/PPC/PPCELFFile.h
lld/trunk/lib/ReaderWriter/ELF/PPC/PPCELFReader.h
lld/trunk/lib/ReaderWriter/ELF/PPC/PPCLinkingContext.cpp
lld/trunk/lib/ReaderWriter/ELF/PPC/PPCLinkingContext.h
lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.cpp
lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.h
lld/trunk/test/elf/ppc.test
Modified:
lld/trunk/include/lld/ReaderWriter/ELFTargets.h
lld/trunk/lib/Driver/CMakeLists.txt
lld/trunk/lib/Driver/GnuLdDriver.cpp
lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt
lld/trunk/lib/ReaderWriter/ELF/Makefile
lld/trunk/lib/ReaderWriter/ELF/Mips/Makefile
lld/trunk/tools/lld/Makefile
Modified: lld/trunk/include/lld/ReaderWriter/ELFTargets.h
URL:
<a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/ELFTargets.h?rev=227320&r1=227319&r2=227320&view=diff">http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/ELFTargets.h?rev=227320&r1=227319&r2=227320&view=diff</a>
==============================================================================
--- lld/trunk/include/lld/ReaderWriter/ELFTargets.h (original)
+++ lld/trunk/include/lld/ReaderWriter/ELFTargets.h Wed Jan 28 10:37:43
2015
@@ -26,7 +26,6 @@ LLVM_TARGET(AArch64)
LLVM_TARGET(ARM)
LLVM_TARGET(Hexagon)
LLVM_TARGET(Mips)
-LLVM_TARGET(PPC)
LLVM_TARGET(X86)
LLVM_TARGET(X86_64)
Modified: lld/trunk/lib/Driver/CMakeLists.txt
URL:
<a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/CMakeLists.txt?rev=227320&r1=227319&r2=227320&view=diff">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/CMakeLists.txt?rev=227320&r1=227319&r2=227320&view=diff</a>
==============================================================================
--- lld/trunk/lib/Driver/CMakeLists.txt (original)
+++ lld/trunk/lib/Driver/CMakeLists.txt Wed Jan 28 10:37:43 2015
@@ -28,7 +28,6 @@ add_llvm_library(lldDriver
lldARMELFTarget
lldHexagonELFTarget
lldMipsELFTarget
- lldPPCELFTarget
lldX86ELFTarget
lldX86_64ELFTarget
lldCore
Modified: lld/trunk/lib/Driver/GnuLdDriver.cpp
URL:
<a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/GnuLdDriver.cpp?rev=227320&r1=227319&r2=227320&view=diff">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/GnuLdDriver.cpp?rev=227320&r1=227319&r2=227320&view=diff</a>
==============================================================================
--- lld/trunk/lib/Driver/GnuLdDriver.cpp (original)
+++ lld/trunk/lib/Driver/GnuLdDriver.cpp Wed Jan 28 10:37:43 2015
@@ -329,7 +329,6 @@ createELFLinkingContext(llvm::Triple tri
LLVM_TARGET(ARM)
LLVM_TARGET(Hexagon)
LLVM_TARGET(Mips)
- LLVM_TARGET(PPC)
LLVM_TARGET(X86)
LLVM_TARGET(X86_64)
return nullptr;
Modified: lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt
URL:
<a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt?rev=227320&r1=227319&r2=227320&view=diff">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt?rev=227320&r1=227319&r2=227320&view=diff</a>
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt (original)
+++ lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt Wed Jan 28 10:37:43
2015
@@ -14,7 +14,6 @@ include_directories(.)
add_subdirectory(X86)
add_subdirectory(X86_64)
-add_subdirectory(PPC)
add_subdirectory(Mips)
add_subdirectory(Hexagon)
add_subdirectory(AArch64)
Modified: lld/trunk/lib/ReaderWriter/ELF/Makefile
URL:
<a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Makefile?rev=227320&r1=227319&r2=227320&view=diff">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Makefile?rev=227320&r1=227319&r2=227320&view=diff</a>
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Makefile (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Makefile Wed Jan 28 10:37:43 2015
@@ -14,6 +14,6 @@ USEDLIBS = lldPasses.a
CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLD_LEVEL)/lib/ReaderWriter/ELF
# these link against this lib
-PARALLEL_DIRS := Hexagon PPC X86 X86_64 Mips AArch64 ARM
+PARALLEL_DIRS := Hexagon X86 X86_64 Mips AArch64 ARM
include $(LLD_LEVEL)/Makefile
Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/Makefile
URL:
<a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/Makefile?rev=227320&r1=227319&r2=227320&view=diff">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/Makefile?rev=227320&r1=227319&r2=227320&view=diff</a>
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/Makefile (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/Makefile Wed Jan 28 10:37:43 2015
@@ -1,4 +1,4 @@
-##===- lld/lib/ReaderWriter/ELF/PPC/Makefile ----------*- Makefile
-*-===##
+##===- lld/lib/ReaderWriter/ELF/Mips/Makefile ----------*- Makefile
-*-===##
#
# The LLVM Compiler Infrastructure
#
Removed: lld/trunk/lib/ReaderWriter/ELF/PPC/CMakeLists.txt
URL:
<a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/CMakeLists.txt?rev=227319&view=auto">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/CMakeLists.txt?rev=227319&view=auto</a>
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/PPC/CMakeLists.txt (original)
+++ lld/trunk/lib/ReaderWriter/ELF/PPC/CMakeLists.txt (removed)
@@ -1,9 +0,0 @@
-add_llvm_library(lldPPCELFTarget
- PPCLinkingContext.cpp
- PPCTargetHandler.cpp
- LINK_LIBS
- lldCore
- lldELF
- LLVMObject
- LLVMSupport
- )
Removed: lld/trunk/lib/ReaderWriter/ELF/PPC/Makefile
URL:
<a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/Makefile?rev=227319&view=auto">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/Makefile?rev=227319&view=auto</a>
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/PPC/Makefile (original)
+++ lld/trunk/lib/ReaderWriter/ELF/PPC/Makefile (removed)
@@ -1,15 +0,0 @@
-##===- lld/lib/ReaderWriter/ELF/PPC/Makefile ----------*- Makefile
-*-===##
-#
-# The LLVM Compiler Infrastructure
-#
-# This file is distributed under the University of Illinois Open Source
-# License. See LICENSE.TXT for details.
-#
-##===----------------------------------------------------------------------===##
-
-LLD_LEVEL := ../../../..
-LIBRARYNAME := lldPPCELFTarget
-USEDLIBS = lldCore.a
-CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLD_LEVEL)/lib/ReaderWriter/ELF
-
-include $(LLD_LEVEL)/Makefile
Removed: lld/trunk/lib/ReaderWriter/ELF/PPC/PPCELFFile.h
URL:
<a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/PPCELFFile.h?rev=227319&view=auto">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/PPCELFFile.h?rev=227319&view=auto</a>
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/PPC/PPCELFFile.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/PPC/PPCELFFile.h (removed)
@@ -1,41 +0,0 @@
-//===- lib/ReaderWriter/ELF/PPCELFFile.h
-------------------------------===//
-//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLD_READER_WRITER_ELF_PPC_ELF_FILE_H
-#define LLD_READER_WRITER_ELF_PPC_ELF_FILE_H
-
-#include "ELFReader.h"
-
-namespace lld {
-namespace elf {
-
-class PPCLinkingContext;
-
-template <class ELFT> class PPCELFFile : public ELFFile<ELFT> {
-public:
- PPCELFFile(std::unique_ptr<MemoryBuffer> mb, bool atomizeStrings)
- : ELFFile<ELFT>(std::move(mb), atomizeStrings) {}
-
- static ErrorOr<std::unique_ptr<PPCELFFile>>
- create(std::unique_ptr<MemoryBuffer> mb, bool atomizeStrings) {
- return std::unique_ptr<PPCELFFile<ELFT>>(
- new PPCELFFile<ELFT>(std::move(mb), atomizeStrings));
- }
-};
-
-template <class ELFT> class PPCDynamicFile : public DynamicFile<ELFT> {
-public:
- PPCDynamicFile(const PPCLinkingContext &context, StringRef name)
- : DynamicFile<ELFT>(context, name) {}
-};
-
-} // elf
-} // lld
-
-#endif // LLD_READER_WRITER_ELF_PPC_ELF_FILE_H
Removed: lld/trunk/lib/ReaderWriter/ELF/PPC/PPCELFReader.h
URL:
<a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/PPCELFReader.h?rev=227319&view=auto">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/PPCELFReader.h?rev=227319&view=auto</a>
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/PPC/PPCELFReader.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/PPC/PPCELFReader.h (removed)
@@ -1,60 +0,0 @@
-//===- lib/ReaderWriter/ELF/PPC/PPCELFReader.h
----------------------------===//
-//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLD_READER_WRITER_PPC_PPC_ELF_READER_H
-#define LLD_READER_WRITER_PPC_PPC_ELF_READER_H
-
-#include "ELFReader.h"
-#include "PPCELFFile.h"
-
-namespace lld {
-namespace elf {
-
-typedef llvm::object::ELFType<llvm::support::big, 2, false> PPCELFType;
-
-struct PPCDynamicFileCreateELFTraits {
- typedef llvm::ErrorOr<std::unique_ptr<lld::SharedLibraryFile>>
result_type;
-
- template <class ELFT>
- static result_type create(std::unique_ptr<llvm::MemoryBuffer> mb,
- bool useUndefines) {
- return lld::elf::PPCDynamicFile<ELFT>::create(std::move(mb),
useUndefines);
- }
-};
-
-struct PPCELFFileCreateELFTraits {
- typedef llvm::ErrorOr<std::unique_ptr<lld::File>> result_type;
-
- template <class ELFT>
- static result_type create(std::unique_ptr<llvm::MemoryBuffer> mb,
- bool atomizeStrings) {
- return lld::elf::PPCELFFile<ELFT>::create(std::move(mb),
atomizeStrings);
- }
-};
-
-class PPCELFObjectReader
- : public ELFObjectReader<PPCELFType, PPCELFFileCreateELFTraits> {
-public:
- PPCELFObjectReader(bool atomizeStrings)
- : ELFObjectReader<PPCELFType, PPCELFFileCreateELFTraits>(
- atomizeStrings, llvm::ELF::EM_PPC) {}
-};
-
-class PPCELFDSOReader
- : public ELFDSOReader<PPCELFType, PPCDynamicFileCreateELFTraits> {
-public:
- PPCELFDSOReader(bool useUndefines)
- : ELFDSOReader<PPCELFType, PPCDynamicFileCreateELFTraits>(
- useUndefines, llvm::ELF::EM_PPC) {}
-};
-
-} // namespace elf
-} // namespace lld
-
-#endif // LLD_READER_WRITER_PPC_PPC_ELF_READER_H
Removed: lld/trunk/lib/ReaderWriter/ELF/PPC/PPCLinkingContext.cpp
URL:
<a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/PPCLinkingContext.cpp?rev=227319&view=auto">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/PPCLinkingContext.cpp?rev=227319&view=auto</a>
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/PPC/PPCLinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/PPC/PPCLinkingContext.cpp (removed)
@@ -1,29 +0,0 @@
-//===- lib/ReaderWriter/ELF/PPC/PPCLinkingContext.cpp
---------------------===//
-//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "PPCLinkingContext.h"
-#include "PPCTargetHandler.h"
-#include "lld/Core/LLVM.h"
-#include "llvm/ADT/StringSwitch.h"
-#include "llvm/Support/ErrorOr.h"
-
-using namespace lld;
-
-std::unique_ptr<ELFLinkingContext>
-elf::PPCLinkingContext::create(llvm::Triple triple) {
- if (triple.getArch() == llvm::Triple::ppc)
- return std::unique_ptr<ELFLinkingContext>(
- new elf::PPCLinkingContext(triple));
- return nullptr;
-}
-
-elf::PPCLinkingContext::PPCLinkingContext(llvm::Triple triple)
- : ELFLinkingContext(triple, std::unique_ptr<TargetHandlerBase>(
- new PPCTargetHandler(*this))) {}
-
Removed: lld/trunk/lib/ReaderWriter/ELF/PPC/PPCLinkingContext.h
URL:
<a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/PPCLinkingContext.h?rev=227319&view=auto">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/PPCLinkingContext.h?rev=227319&view=auto</a>
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/PPC/PPCLinkingContext.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/PPC/PPCLinkingContext.h (removed)
@@ -1,32 +0,0 @@
-//===- lib/ReaderWriter/ELF/PPC/PPCLinkingContext.h
-----------------------===//
-//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLD_READER_WRITER_ELF_PPC_PPC_LINKING_CONTEXT_H
-#define LLD_READER_WRITER_ELF_PPC_PPC_LINKING_CONTEXT_H
-
-#include "lld/ReaderWriter/ELFLinkingContext.h"
-#include "llvm/Object/ELF.h"
-#include "llvm/Support/ELF.h"
-
-namespace lld {
-namespace elf {
-
-class PPCLinkingContext final : public ELFLinkingContext {
-public:
- static std::unique_ptr<ELFLinkingContext> create(llvm::Triple);
- PPCLinkingContext(llvm::Triple triple);
-
- /// \brief PPC has no relative relocations defined
- bool isRelativeReloc(const Reference &) const override { return
false; }
-};
-
-} // elf
-} // lld
-
-#endif // LLD_READER_WRITER_ELF_PPC_PPC_LINKING_CONTEXT_H
Removed: lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.cpp
URL:
<a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.cpp?rev=227319&view=auto">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.cpp?rev=227319&view=auto</a>
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.cpp (removed)
@@ -1,93 +0,0 @@
-//===- lib/ReaderWriter/ELF/PPC/PPCTargetHandler.cpp
----------------------===//
-//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "PPCTargetHandler.h"
-#include "PPCLinkingContext.h"
-
-using namespace lld;
-using namespace elf;
-
-using namespace llvm::ELF;
-
-/// \brief The following relocation routines are derived from the
-/// SYSTEM V APPLICATION BINARY INTERFACE: PowerPC Processor Supplement
-/// Symbols used:
-/// A: Added used to compute the value, r_addend
-/// P: Place address of the field being relocated, r_offset
-/// S: Value of the symbol whose index resides in the relocation entry.
-
-/// \brief low24 (S + A - P) >> 2 : Verify
-static int relocB24PCREL(uint8_t *location, uint64_t P, uint64_t S,
- uint64_t A) {
- int32_t result = (uint32_t)(((S + A) - P));
- if ((result < 0x1000000) && (result > -0x1000000)) {
- result &= ~-(0x1000000);
- *reinterpret_cast<llvm::support::ubig32_t *>(location) = result |
- (uint32_t)*reinterpret_cast<llvm::support::ubig32_t
*>(location);
- return 0;
- }
- return 1;
-}
-
-std::error_code PPCTargetRelocationHandler::applyRelocation(
- ELFWriter &writer, llvm::FileOutputBuffer &buf, const
lld::AtomLayout &atom,
- const Reference &ref) const {
- uint8_t *atomContent = buf.getBufferStart() + atom._fileOffset;
- uint8_t *location = atomContent + ref.offsetInAtom();
- uint64_t targetVAddress = writer.addressOfAtom(ref.target());
- uint64_t relocVAddress = atom._virtualAddr + ref.offsetInAtom();
-
- if (ref.kindNamespace() != Reference::KindNamespace::ELF)
- return std::error_code();
- assert(ref.kindArch() == Reference::KindArch::PowerPC);
- switch (ref.kindValue()) {
- case R_PPC_REL24:
- relocB24PCREL(location, relocVAddress, targetVAddress,
ref.addend());
- break;
-
- default:
- return make_unhandled_reloc_error();
- }
-
- return std::error_code();
-}
-
-PPCTargetHandler::PPCTargetHandler(PPCLinkingContext &context)
- : _ppcLinkingContext(context),
- _ppcTargetLayout(new PPCTargetLayout<PPCELFType>(context)),
- _ppcRelocationHandler(new PPCTargetRelocationHandler()) {}
-
-void PPCTargetHandler::registerRelocationNames(Registry ®istry) {
- registry.addKindTable(Reference::KindNamespace::ELF,
- Reference::KindArch::PowerPC, kindStrings);
-}
-
-std::unique_ptr<Writer> PPCTargetHandler::getWriter() {
- switch (_ppcLinkingContext.getOutputELFType()) {
- case llvm::ELF::ET_EXEC:
- return std::unique_ptr<Writer>(new
elf::ExecutableWriter<PPCELFType>(
- _ppcLinkingContext, *_ppcTargetLayout.get()));
- case llvm::ELF::ET_DYN:
- return std::unique_ptr<Writer>(new
elf::DynamicLibraryWriter<PPCELFType>(
- _ppcLinkingContext, *_ppcTargetLayout.get()));
- case llvm::ELF::ET_REL:
- llvm_unreachable("TODO: support -r mode");
- default:
- llvm_unreachable("unsupported output type");
- }
-}
-
-#define ELF_RELOC(name, value) LLD_KIND_STRING_ENTRY(name),
-
-const Registry::KindStrings PPCTargetHandler::kindStrings[] = {
-#include "llvm/Support/ELFRelocs/PowerPC.def"
- LLD_KIND_STRING_END
-};
-
-#undef ELF_RELOC
Removed: lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.h
URL:
<a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.h?rev=227319&view=auto">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.h?rev=227319&view=auto</a>
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.h (removed)
@@ -1,67 +0,0 @@
-//===- lib/ReaderWriter/ELF/PPC/PPCTargetHandler.h
------------------------===//
-//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLD_READER_WRITER_ELF_PPC_PPC_TARGET_HANDLER_H
-#define LLD_READER_WRITER_ELF_PPC_PPC_TARGET_HANDLER_H
-
-#include "DefaultTargetHandler.h"
-#include "PPCELFReader.h"
-#include "TargetLayout.h"
-
-namespace lld {
-namespace elf {
-class PPCLinkingContext;
-
-template <class ELFT> class PPCTargetLayout : public TargetLayout<ELFT>
{
-public:
- PPCTargetLayout(PPCLinkingContext &context) :
TargetLayout<ELFT>(context) {}
-};
-
-class PPCTargetRelocationHandler final : public TargetRelocationHandler
{
-public:
- std::error_code applyRelocation(ELFWriter &, llvm::FileOutputBuffer &,
- const lld::AtomLayout &,
- const Reference &) const override;
-};
-
-class PPCTargetHandler final
- : public DefaultTargetHandler<PPCELFType> {
-public:
- PPCTargetHandler(PPCLinkingContext &context);
-
- PPCTargetLayout<PPCELFType> &getTargetLayout() override {
- return *(_ppcTargetLayout.get());
- }
-
- void registerRelocationNames(Registry ®istry) override;
-
- const PPCTargetRelocationHandler &getRelocationHandler() const
override {
- return *(_ppcRelocationHandler.get());
- }
-
- std::unique_ptr<Reader> getObjReader(bool atomizeStrings) override {
- return std::unique_ptr<Reader>(new
PPCELFObjectReader(atomizeStrings));
- }
-
- std::unique_ptr<Reader> getDSOReader(bool useShlibUndefines) override
{
- return std::unique_ptr<Reader>(new
PPCELFDSOReader(useShlibUndefines));
- }
-
- std::unique_ptr<Writer> getWriter() override;
-
-private:
- static const Registry::KindStrings kindStrings[];
- PPCLinkingContext &_ppcLinkingContext;
- std::unique_ptr<PPCTargetLayout<PPCELFType>> _ppcTargetLayout;
- std::unique_ptr<PPCTargetRelocationHandler> _ppcRelocationHandler;
-};
-} // end namespace elf
-} // end namespace lld
-
-#endif
Removed: lld/trunk/test/elf/ppc.test
URL:
<a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/ppc.test?rev=227319&view=auto">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/ppc.test?rev=227319&view=auto</a>
==============================================================================
--- lld/trunk/test/elf/ppc.test (original)
+++ lld/trunk/test/elf/ppc.test (removed)
@@ -1,14 +0,0 @@
-RUN: lld -flavor gnu -target powerpc %p/Inputs/branch-test.ppc
%p/Inputs/target-test.ppc -o %t1 --noinhibit-exec
-RUN: llvm-readobj -h %t1 | FileCheck -check-prefix=ppc-readobj %s
-
-
-ppc-readobj: ElfHeader {
-ppc-readobj: Ident {
-ppc-readobj: Class: 32-bit (0x1)
-ppc-readobj: DataEncoding: BigEndian (0x2)
-ppc-readobj: FileVersion: 1
-ppc-readobj: OS/ABI: SystemV (0x0)
-ppc-readobj: ABIVersion: 0
-ppc-readobj: }
-ppc-readobj: Type: Executable (0x2)
-ppc-readobj: Machine: EM_PPC (0x14)
Modified: lld/trunk/tools/lld/Makefile
URL:
<a class="moz-txt-link-freetext" href="http://llvm.org/viewvc/llvm-project/lld/trunk/tools/lld/Makefile?rev=227320&r1=227319&r2=227320&view=diff">http://llvm.org/viewvc/llvm-project/lld/trunk/tools/lld/Makefile?rev=227320&r1=227319&r2=227320&view=diff</a>
==============================================================================
--- lld/trunk/tools/lld/Makefile (original)
+++ lld/trunk/tools/lld/Makefile Wed Jan 28 10:37:43 2015
@@ -22,7 +22,7 @@ LINK_COMPONENTS := $(TARGETS_TO_BUILD)
USEDLIBS = lldDriver.a lldConfig.a \
lldELF.a lldMachO.a lldPasses.a lldPECOFF.a lldYAML.a \
lldReaderWriter.a lldCore.a lldNative.a \
- lldHexagonELFTarget.a lldPPCELFTarget.a lldMipsELFTarget.a \
+ lldHexagonELFTarget.a lldMipsELFTarget.a \
lldX86ELFTarget.a lldX86_64ELFTarget.a lldAArch64ELFTarget.a
\
lldARMELFTarget.a \
LLVMOption.a
_______________________________________________
llvm-commits mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a>
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<pre wrap="">
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
llvm-commits mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation</pre>
</body>
</html>