Hi Greg,<div><br></div><div>When you revert a patch please use the svn id and explain what the problem is.</div><div><br></div><div>Thanks!</div><div><br></div><div>-eric<br><br><div class="gmail_quote">On Fri Jan 23 2015 at 11:55:09 AM Greg Fitzgerald <<a href="mailto:garious@gmail.com">garious@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: garious<br>
Date: Fri Jan 23 13:24:32 2015<br>
New Revision: 226928<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=226928&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?rev=226928&view=rev</a><br>
Log:<br>
Revert " Fix the ELF shared library build targets"<br>
<br>
This reverts commit 6a3f545b44cea46321e025d9ab7737<u></u>86af86cb51.<br>
<br>
Added:<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/AArch64/AArch64Target.h<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/ARM/ARMTarget.h<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/Hexagon/HexagonTarget.h<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/Mips/MipsTarget.h<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/PPC/PPCTarget.h<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/Targets.h<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/X86/X86Target.h<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/X86_64/X86_64Target.h<br>
Removed:<br>
lld/trunk/include/lld/<u></u>ReaderWriter/ELFTargets.h<br>
Modified:<br>
lld/trunk/lib/Driver/<u></u>CMakeLists.txt<br>
lld/trunk/lib/Driver/<u></u>GnuLdDriver.cpp<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/AArch64/<u></u>AArch64DynamicLibraryWriter.h<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/AArch64/<u></u>AArch64LinkingContext.cpp<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/AArch64/<u></u>AArch64LinkingContext.h<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/AArch64/CMakeLists.txt<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/ARM/ARMExecutableWriter.h<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/ARM/ARMLinkingContext.cpp<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/ARM/ARMLinkingContext.h<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/ARM/CMakeLists.txt<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/CMakeLists.txt<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/ELFLinkingContext.cpp<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/Hexagon/CMakeLists.txt<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/Makefile<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/Mips/CMakeLists.txt<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/PPC/CMakeLists.txt<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/PPC/PPCLinkingContext.cpp<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/PPC/PPCLinkingContext.h<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/X86/CMakeLists.txt<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/X86/X86LinkingContext.cpp<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/X86/X86LinkingContext.h<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/X86_64/CMakeLists.txt<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/X86_64/X86_<u></u>64DynamicLibraryWriter.h<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/X86_64/X86_<u></u>64LinkingContext.cpp<br>
lld/trunk/lib/ReaderWriter/<u></u>ELF/X86_64/X86_<u></u>64LinkingContext.h<br>
lld/trunk/lib/ReaderWriter/<u></u>MachO/CMakeLists.txt<br>
lld/trunk/lib/ReaderWriter/<u></u>MachO/Makefile<br>
lld/trunk/lib/ReaderWriter/<u></u>PECOFF/CMakeLists.txt<br>
lld/trunk/lib/ReaderWriter/<u></u>PECOFF/Makefile<br>
<br>
Removed: lld/trunk/include/lld/<u></u>ReaderWriter/ELFTargets.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/ELFTargets.h?rev=226927&view=auto" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/include/lld/<u></u>ReaderWriter/ELFTargets.h?rev=<u></u>226927&view=auto</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/include/lld/<u></u>ReaderWriter/ELFTargets.h (original)<br>
+++ lld/trunk/include/lld/<u></u>ReaderWriter/ELFTargets.h (removed)<br>
@@ -1,40 +0,0 @@<br>
-//===- lld/ReaderWriter/ELFTargets.h ------------------------------<u></u>--------===//<br>
-//<br>
-// The LLVM Linker<br>
-//<br>
-// This file is distributed under the University of Illinois Open Source<br>
-// License. See LICENSE.TXT for details.<br>
-//<br>
-//===------------------------<u></u>------------------------------<u></u>----------------===//<br>
-<br>
-#ifndef LLD_READER_WRITER_ELF_TARGETS_<u></u>H<br>
-#define LLD_READER_WRITER_ELF_TARGETS_<u></u>H<br>
-<br>
-#include "ELFLinkingContext.h"<br>
-<br>
-namespace lld {<br>
-namespace elf {<br>
-<br>
-#define LLVM_TARGET(TargetName) \<br>
- class TargetName##LinkingContext final : public ELFLinkingContext { \<br>
- public: \<br>
- TargetName##LinkingContext(<u></u>llvm::Triple); \<br>
- };<br>
-#include "llvm/Config/Targets.def"<br>
-<br>
-// X86 => X86,X86_64<br>
-class X86_64LinkingContext final : public ELFLinkingContext {<br>
-public:<br>
- X86_64LinkingContext(llvm::<u></u>Triple);<br>
-};<br>
-<br>
-// PowerPC => PPC<br>
-class PPCLinkingContext final : public ELFLinkingContext {<br>
-public:<br>
- PPCLinkingContext(llvm::<u></u>Triple);<br>
-};<br>
-<br>
-} // end namespace elf<br>
-} // end namespace lld<br>
-<br>
-#endif<br>
<br>
Modified: lld/trunk/lib/Driver/<u></u>CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/CMakeLists.txt?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/Driver/<u></u>CMakeLists.txt?rev=226928&r1=<u></u>226927&r2=226928&view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/Driver/<u></u>CMakeLists.txt (original)<br>
+++ lld/trunk/lib/Driver/<u></u>CMakeLists.txt Fri Jan 23 13:24:32 2015<br>
@@ -24,13 +24,6 @@ add_llvm_library(lldDriver<br>
lldMachO<br>
lldPECOFF<br>
lldELF<br>
- lldAArch64ELFTarget<br>
- lldARMELFTarget<br>
- lldHexagonELFTarget<br>
- lldMipsELFTarget<br>
- lldPPCELFTarget<br>
- lldX86ELFTarget<br>
- lldX86_64ELFTarget<br>
lldCore<br>
lldNative<br>
lldReaderWriter<br>
<br>
Modified: lld/trunk/lib/Driver/<u></u>GnuLdDriver.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/GnuLdDriver.cpp?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/Driver/<u></u>GnuLdDriver.cpp?rev=226928&r1=<u></u>226927&r2=226928&view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/Driver/<u></u>GnuLdDriver.cpp (original)<br>
+++ lld/trunk/lib/Driver/<u></u>GnuLdDriver.cpp Fri Jan 23 13:24:32 2015<br>
@@ -15,7 +15,6 @@<br>
<br>
#include "lld/Driver/Driver.h"<br>
#include "lld/ReaderWriter/<u></u>ELFLinkingContext.h"<br>
-#include "lld/ReaderWriter/ELFTargets.<u></u>h"<br>
#include "lld/ReaderWriter/<u></u>LinkerScript.h"<br>
#include "llvm/ADT/ArrayRef.h"<br>
#include "llvm/ADT/Optional.h"<br>
@@ -315,35 +314,6 @@ void GnuLdDriver::<u></u>addPlatformSearchDirs(<br>
ctx.addSearchPath("=/usr/lib")<u></u>;<br>
}<br>
<br>
-std::unique_ptr<<u></u>ELFLinkingContext><br>
-createELFLinkingContext(llvm:<u></u>:Triple triple) {<br>
- switch (triple.getArch()) {<br>
- case llvm::Triple::x86:<br>
- return std::unique_ptr<<u></u>ELFLinkingContext>(<br>
- new lld::elf::X86LinkingContext(<u></u>triple));<br>
- case llvm::Triple::x86_64:<br>
- return std::unique_ptr<<u></u>ELFLinkingContext>(<br>
- new lld::elf::X86_<u></u>64LinkingContext(triple));<br>
- case llvm::Triple::hexagon:<br>
- return std::unique_ptr<<u></u>ELFLinkingContext>(<br>
- new lld::elf::<u></u>HexagonLinkingContext(triple))<u></u>;<br>
- case llvm::Triple::mipsel:<br>
- return std::unique_ptr<<u></u>ELFLinkingContext>(<br>
- new lld::elf::MipsLinkingContext(<u></u>triple));<br>
- case llvm::Triple::ppc:<br>
- return std::unique_ptr<<u></u>ELFLinkingContext>(<br>
- new lld::elf::PPCLinkingContext(<u></u>triple));<br>
- case llvm::Triple::aarch64:<br>
- return std::unique_ptr<<u></u>ELFLinkingContext>(<br>
- new lld::elf::<u></u>AArch64LinkingContext(triple))<u></u>;<br>
- case llvm::Triple::arm:<br>
- return std::unique_ptr<<u></u>ELFLinkingContext>(<br>
- new lld::elf::ARMLinkingContext(<u></u>triple));<br>
- default:<br>
- return nullptr;<br>
- }<br>
-}<br>
-<br>
bool GnuLdDriver::parse(int argc, const char *argv[],<br>
std::unique_ptr<<u></u>ELFLinkingContext> &context,<br>
raw_ostream &diagnostics) {<br>
@@ -379,7 +349,7 @@ bool GnuLdDriver::parse(int argc, const<br>
if (!applyEmulation(triple, *parsedArgs, diagnostics))<br>
return false;<br>
<br>
- std::unique_ptr<<u></u>ELFLinkingContext> ctx(createELFLinkingContext(<u></u>triple));<br>
+ std::unique_ptr<<u></u>ELFLinkingContext> ctx(ELFLinkingContext::create(<u></u>triple));<br>
<br>
if (!ctx) {<br>
diagnostics << "unknown target triple\n";<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/AArch64/<u></u>AArch64DynamicLibraryWriter.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/AArch64/AArch64DynamicLibraryWriter.h?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/AArch64/<u></u>AArch64DynamicLibraryWriter.h?<u></u>rev=226928&r1=226927&r2=<u></u>226928&view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/AArch64/<u></u>AArch64DynamicLibraryWriter.h (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/AArch64/<u></u>AArch64DynamicLibraryWriter.h Fri Jan 23 13:24:32 2015<br>
@@ -10,7 +10,6 @@<br>
#define AARCH64_DYNAMIC_LIBRARY_<u></u>WRITER_H<br>
<br>
#include "AArch64LinkingContext.h"<br>
-#include "AArch64TargetHandler.h"<br>
#include "DynamicLibraryWriter.h"<br>
<br>
namespace lld {<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/AArch64/<u></u>AArch64LinkingContext.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/AArch64/AArch64LinkingContext.cpp?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/AArch64/<u></u>AArch64LinkingContext.cpp?rev=<u></u>226928&r1=226927&r2=226928&<u></u>view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/AArch64/<u></u>AArch64LinkingContext.cpp (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/AArch64/<u></u>AArch64LinkingContext.cpp Fri Jan 23 13:24:32 2015<br>
@@ -9,14 +9,9 @@<br>
<br>
#include "AArch64LinkingContext.h"<br>
#include "AArch64RelocationPass.h"<br>
-#include "AArch64TargetHandler.h"<br>
<br>
using namespace lld;<br>
<br>
-elf::AArch64LinkingContext::<u></u>AArch64LinkingContext(llvm::<u></u>Triple triple)<br>
- : ELFLinkingContext(triple, std::unique_ptr<<u></u>TargetHandlerBase>(<br>
- new AArch64TargetHandler(*this))) {}<br>
-<br>
void elf::AArch64LinkingContext::<u></u>addPasses(PassManager &pm) {<br>
auto pass = createAArch64RelocationPass(*<u></u>this);<br>
if (pass)<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/AArch64/<u></u>AArch64LinkingContext.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/AArch64/AArch64LinkingContext.h?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/AArch64/<u></u>AArch64LinkingContext.h?rev=<u></u>226928&r1=226927&r2=226928&<u></u>view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/AArch64/<u></u>AArch64LinkingContext.h (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/AArch64/<u></u>AArch64LinkingContext.h Fri Jan 23 13:24:32 2015<br>
@@ -10,6 +10,7 @@<br>
#ifndef LLD_READER_WRITER_ELF_AARCH64_<u></u>AARCH64_LINKING_CONTEXT_H<br>
#define LLD_READER_WRITER_ELF_AARCH64_<u></u>AARCH64_LINKING_CONTEXT_H<br>
<br>
+#include "AArch64TargetHandler.h"<br>
#include "lld/ReaderWriter/<u></u>ELFLinkingContext.h"<br>
#include "llvm/Object/ELF.h"<br>
#include "llvm/Support/ELF.h"<br>
@@ -24,7 +25,9 @@ enum {<br>
<br>
class AArch64LinkingContext final : public ELFLinkingContext {<br>
public:<br>
- AArch64LinkingContext(llvm::<u></u>Triple);<br>
+ AArch64LinkingContext(llvm::<u></u>Triple triple)<br>
+ : ELFLinkingContext(triple, std::unique_ptr<<u></u>TargetHandlerBase>(<br>
+ new AArch64TargetHandler(*this))) {}<br>
<br>
void addPasses(PassManager &) override;<br>
<br>
<br>
Added: lld/trunk/lib/ReaderWriter/<u></u>ELF/AArch64/AArch64Target.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/AArch64/AArch64Target.h?rev=226928&view=auto" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/AArch64/<u></u>AArch64Target.h?rev=226928&<u></u>view=auto</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/AArch64/AArch64Target.h (added)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/AArch64/AArch64Target.h Fri Jan 23 13:24:32 2015<br>
@@ -0,0 +1,10 @@<br>
+//===- lib/ReaderWriter/ELF/AArch64/<u></u>AArch64Target.h -----------------------===//<br>
+//<br>
+// The LLVM Linker<br>
+//<br>
+// This file is distributed under the University of Illinois Open Source<br>
+// License. See LICENSE.TXT for details.<br>
+//<br>
+//===------------------------<u></u>------------------------------<u></u>----------------===//<br>
+<br>
+#include "AArch64LinkingContext.h"<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/AArch64/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/AArch64/CMakeLists.txt?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/AArch64/<u></u>CMakeLists.txt?rev=226928&r1=<u></u>226927&r2=226928&view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/AArch64/CMakeLists.txt (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/AArch64/CMakeLists.txt Fri Jan 23 13:24:32 2015<br>
@@ -5,7 +5,5 @@ add_llvm_library(<u></u>lldAArch64ELFTarget<br>
AArch64RelocationPass.cpp<br>
LINK_LIBS<br>
lldCore<br>
- lldELF<br>
- LLVMObject<br>
LLVMSupport<br>
)<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/ARM/ARMExecutableWriter.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ARM/ARMExecutableWriter.h?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/ARM/<u></u>ARMExecutableWriter.h?rev=<u></u>226928&r1=226927&r2=226928&<u></u>view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/ARM/ARMExecutableWriter.h (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/ARM/ARMExecutableWriter.h Fri Jan 23 13:24:32 2015<br>
@@ -11,7 +11,6 @@<br>
<br>
#include "ExecutableWriter.h"<br>
#include "ARMLinkingContext.h"<br>
-#include "ARMTargetHandler.h"<br>
<br>
namespace lld {<br>
namespace elf {<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/ARM/ARMLinkingContext.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ARM/ARMLinkingContext.cpp?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/ARM/<u></u>ARMLinkingContext.cpp?rev=<u></u>226928&r1=226927&r2=226928&<u></u>view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/ARM/ARMLinkingContext.cpp (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/ARM/ARMLinkingContext.cpp Fri Jan 23 13:24:32 2015<br>
@@ -9,15 +9,10 @@<br>
<br>
#include "ARMLinkingContext.h"<br>
#include "ARMRelocationPass.h"<br>
-#include "ARMTargetHandler.h"<br>
<br>
using namespace lld;<br>
using namespace lld::elf;<br>
<br>
-elf::ARMLinkingContext::<u></u>ARMLinkingContext(llvm::Triple triple)<br>
- : ELFLinkingContext(triple, std::unique_ptr<<u></u>TargetHandlerBase>(<br>
- new ARMTargetHandler(*this))) {}<br>
-<br>
void elf::ARMLinkingContext::<u></u>addPasses(PassManager &pm) {<br>
auto pass = createARMRelocationPass(*this)<u></u>;<br>
if (pass)<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/ARM/ARMLinkingContext.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ARM/ARMLinkingContext.h?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/ARM/<u></u>ARMLinkingContext.h?rev=<u></u>226928&r1=226927&r2=226928&<u></u>view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/ARM/ARMLinkingContext.h (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/ARM/ARMLinkingContext.h Fri Jan 23 13:24:32 2015<br>
@@ -10,7 +10,10 @@<br>
#ifndef LLD_READER_WRITER_ELF_ARM_ARM_<u></u>LINKING_CONTEXT_H<br>
#define LLD_READER_WRITER_ELF_ARM_ARM_<u></u>LINKING_CONTEXT_H<br>
<br>
+#include "ARMTargetHandler.h"<br>
+<br>
#include "lld/ReaderWriter/<u></u>ELFLinkingContext.h"<br>
+<br>
#include "llvm/Object/ELF.h"<br>
#include "llvm/Support/ELF.h"<br>
<br>
@@ -19,7 +22,9 @@ namespace elf {<br>
<br>
class ARMLinkingContext final : public ELFLinkingContext {<br>
public:<br>
- ARMLinkingContext(llvm::<u></u>Triple);<br>
+ ARMLinkingContext(llvm::Triple triple)<br>
+ : ELFLinkingContext(triple, std::unique_ptr<<u></u>TargetHandlerBase>(<br>
+ new ARMTargetHandler(*this))) {}<br>
<br>
void addPasses(PassManager &) override;<br>
<br>
<br>
Added: lld/trunk/lib/ReaderWriter/<u></u>ELF/ARM/ARMTarget.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ARM/ARMTarget.h?rev=226928&view=auto" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/ARM/<u></u>ARMTarget.h?rev=226928&view=<u></u>auto</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/ARM/ARMTarget.h (added)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/ARM/ARMTarget.h Fri Jan 23 13:24:32 2015<br>
@@ -0,0 +1,10 @@<br>
+//===--------- lib/ReaderWriter/ELF/ARM/<u></u>ARMTarget.h -----------------------===//<br>
+//<br>
+// The LLVM Linker<br>
+//<br>
+// This file is distributed under the University of Illinois Open Source<br>
+// License. See LICENSE.TXT for details.<br>
+//<br>
+//===------------------------<u></u>------------------------------<u></u>----------------===//<br>
+<br>
+#include "ARMLinkingContext.h"<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/ARM/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ARM/CMakeLists.txt?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/ARM/<u></u>CMakeLists.txt?rev=226928&r1=<u></u>226927&r2=226928&view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/ARM/CMakeLists.txt (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/ARM/CMakeLists.txt Fri Jan 23 13:24:32 2015<br>
@@ -5,7 +5,4 @@ add_llvm_library(<u></u>lldARMELFTarget<br>
ARMRelocationPass.cpp<br>
LINK_LIBS<br>
lldCore<br>
- lldELF<br>
- LLVMObject<br>
- LLVMSupport<br>
)<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/CMakeLists.<u></u>txt?rev=226928&r1=226927&r2=<u></u>226928&view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/CMakeLists.txt (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/CMakeLists.txt Fri Jan 23 13:24:32 2015<br>
@@ -4,10 +4,15 @@ add_llvm_library(lldELF<br>
Reader.cpp<br>
Writer.cpp<br>
LINK_LIBS<br>
- lldCore<br>
+ lldHexagonELFTarget<br>
+ lldMipsELFTarget<br>
+ lldPPCELFTarget<br>
lldPasses<br>
- lldYAML<br>
- LLVMSupport<br>
+ lldReaderWriter<br>
+ lldX86ELFTarget<br>
+ lldX86_64ELFTarget<br>
+ lldAArch64ELFTarget<br>
+ lldARMELFTarget<br>
)<br>
<br>
include_directories(.)<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/ELFLinkingContext.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/<u></u>ELFLinkingContext.cpp?rev=<u></u>226928&r1=226927&r2=226928&<u></u>view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/ELFLinkingContext.cpp (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/ELFLinkingContext.cpp Fri Jan 23 13:24:32 2015<br>
@@ -11,8 +11,8 @@<br>
#include "ArrayOrderPass.h"<br>
#include "ELFFile.h"<br>
#include "TargetHandler.h"<br>
+#include "Targets.h"<br>
#include "lld/Core/Instrumentation.h"<br>
-#include "lld/Core/SharedLibraryFile.h"<br>
#include "lld/Passes/LayoutPass.h"<br>
#include "lld/Passes/RoundTripYAMLPass.<u></u>h"<br>
#include "llvm/ADT/Triple.h"<br>
@@ -56,7 +56,7 @@ public:<br>
<br>
ELFLinkingContext::<u></u>ELFLinkingContext(<br>
llvm::Triple triple, std::unique_ptr<<u></u>TargetHandlerBase> targetHandler)<br>
- : _outputELFType(llvm::ELF::ET_<u></u>EXEC), _triple(triple),<br>
+ : _outputELFType(elf::ET_EXEC), _triple(triple),<br>
_targetHandler(std::move(<u></u>targetHandler)), _baseAddress(0),<br>
_isStaticExecutable(false), _noInhibitExec(false), _exportDynamic(false),<br>
_mergeCommonStrings(false), _runLayoutPass(true),<br>
@@ -93,7 +93,7 @@ uint16_t ELFLinkingContext::<u></u>getOutputMac<br>
}<br>
<br>
StringRef ELFLinkingContext::<u></u>entrySymbolName() const {<br>
- if (_outputELFType == llvm::ELF::ET_EXEC && _entrySymbolName.empty())<br>
+ if (_outputELFType == elf::ET_EXEC && _entrySymbolName.empty())<br>
return "_start";<br>
return _entrySymbolName;<br>
}<br>
@@ -129,6 +129,35 @@ bool ELFLinkingContext::<u></u>isRelativeReloc(<br>
<br>
Writer &ELFLinkingContext::writer() const { return *_writer; }<br>
<br>
+std::unique_ptr<<u></u>ELFLinkingContext><br>
+ELFLinkingContext::create(<u></u>llvm::Triple triple) {<br>
+ switch (triple.getArch()) {<br>
+ case llvm::Triple::x86:<br>
+ return std::unique_ptr<<u></u>ELFLinkingContext>(<br>
+ new lld::elf::X86LinkingContext(<u></u>triple));<br>
+ case llvm::Triple::x86_64:<br>
+ return std::unique_ptr<<u></u>ELFLinkingContext>(<br>
+ new lld::elf::X86_<u></u>64LinkingContext(triple));<br>
+ case llvm::Triple::hexagon:<br>
+ return std::unique_ptr<<u></u>ELFLinkingContext>(<br>
+ new lld::elf::<u></u>HexagonLinkingContext(triple))<u></u>;<br>
+ case llvm::Triple::mipsel:<br>
+ return std::unique_ptr<<u></u>ELFLinkingContext>(<br>
+ new lld::elf::MipsLinkingContext(<u></u>triple));<br>
+ case llvm::Triple::ppc:<br>
+ return std::unique_ptr<<u></u>ELFLinkingContext>(<br>
+ new lld::elf::PPCLinkingContext(<u></u>triple));<br>
+ case llvm::Triple::aarch64:<br>
+ return std::unique_ptr<<u></u>ELFLinkingContext>(<br>
+ new lld::elf::<u></u>AArch64LinkingContext(triple))<u></u>;<br>
+ case llvm::Triple::arm:<br>
+ return std::unique_ptr<<u></u>ELFLinkingContext>(<br>
+ new lld::elf::ARMLinkingContext(<u></u>triple));<br>
+ default:<br>
+ return nullptr;<br>
+ }<br>
+}<br>
+<br>
static void buildSearchPath(SmallString<<u></u>128> &path, StringRef dir,<br>
StringRef sysRoot) {<br>
if (!dir.startswith("=/"))<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/Hexagon/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/CMakeLists.txt?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/Hexagon/<u></u>CMakeLists.txt?rev=226928&r1=<u></u>226927&r2=226928&view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/Hexagon/CMakeLists.txt (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/Hexagon/CMakeLists.txt Fri Jan 23 13:24:32 2015<br>
@@ -4,7 +4,5 @@ add_llvm_library(<u></u>lldHexagonELFTarget<br>
HexagonTargetHandler.cpp<br>
LINK_LIBS<br>
lldCore<br>
- lldELF<br>
- LLVMObject<br>
LLVMSupport<br>
)<br>
<br>
Added: lld/trunk/lib/ReaderWriter/<u></u>ELF/Hexagon/HexagonTarget.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonTarget.h?rev=226928&view=auto" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/Hexagon/<u></u>HexagonTarget.h?rev=226928&<u></u>view=auto</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/Hexagon/HexagonTarget.h (added)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/Hexagon/HexagonTarget.h Fri Jan 23 13:24:32 2015<br>
@@ -0,0 +1,10 @@<br>
+//===- lib/ReaderWriter/ELF/Hexagon/<u></u>HexagonTarget.h -----------------------===//<br>
+//<br>
+// The LLVM Linker<br>
+//<br>
+// This file is distributed under the University of Illinois Open Source<br>
+// License. See LICENSE.TXT for details.<br>
+//<br>
+//===------------------------<u></u>------------------------------<u></u>----------------===//<br>
+<br>
+#include "HexagonLinkingContext.h"<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/Makefile<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Makefile?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/Makefile?rev=<u></u>226928&r1=226927&r2=226928&<u></u>view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/Makefile (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/Makefile Fri Jan 23 13:24:32 2015<br>
@@ -9,7 +9,10 @@<br>
<br>
LLD_LEVEL := ../../..<br>
LIBRARYNAME := lldELF<br>
-USEDLIBS = lldPasses.a<br>
+USEDLIBS = lldHexagonELFTarget.a lldPPCELFTarget.a lldMipsELFTarget.a \<br>
+ lldX86ELFTarget.a lldX86_64ELFTarget.a lldAArch64ELFTarget.a \<br>
+ lldARMELFTarget.a \<br>
+ lldReaderWriter.a lldPasses.a<br>
<br>
CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLD_LEVEL)<u></u>/lib/ReaderWriter/ELF<br>
<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/Mips/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/CMakeLists.txt?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/Mips/<u></u>CMakeLists.txt?rev=226928&r1=<u></u>226927&r2=226928&view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/Mips/CMakeLists.txt (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/Mips/CMakeLists.txt Fri Jan 23 13:24:32 2015<br>
@@ -7,7 +7,5 @@ add_llvm_library(<u></u>lldMipsELFTarget<br>
MipsTargetHandler.cpp<br>
LINK_LIBS<br>
lldCore<br>
- lldELF<br>
- LLVMObject<br>
LLVMSupport<br>
)<br>
<br>
Added: lld/trunk/lib/ReaderWriter/<u></u>ELF/Mips/MipsTarget.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTarget.h?rev=226928&view=auto" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/Mips/<u></u>MipsTarget.h?rev=226928&view=<u></u>auto</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/Mips/MipsTarget.h (added)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/Mips/MipsTarget.h Fri Jan 23 13:24:32 2015<br>
@@ -0,0 +1,10 @@<br>
+//===- lib/ReaderWriter/ELF/Mips/<u></u>MipsTarget.h -----------------------------=<u></u>==//<br>
+//<br>
+// The LLVM Linker<br>
+//<br>
+// This file is distributed under the University of Illinois Open Source<br>
+// License. See LICENSE.TXT for details.<br>
+//<br>
+//===------------------------<u></u>------------------------------<u></u>----------------===//<br>
+<br>
+#include "MipsLinkingContext.h"<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/PPC/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/CMakeLists.txt?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/PPC/<u></u>CMakeLists.txt?rev=226928&r1=<u></u>226927&r2=226928&view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/PPC/CMakeLists.txt (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/PPC/CMakeLists.txt Fri Jan 23 13:24:32 2015<br>
@@ -3,7 +3,5 @@ add_llvm_library(<u></u>lldPPCELFTarget<br>
PPCTargetHandler.cpp<br>
LINK_LIBS<br>
lldCore<br>
- lldELF<br>
- LLVMObject<br>
LLVMSupport<br>
)<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/PPC/PPCLinkingContext.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/PPCLinkingContext.cpp?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/PPC/<u></u>PPCLinkingContext.cpp?rev=<u></u>226928&r1=226927&r2=226928&<u></u>view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/PPC/PPCLinkingContext.cpp (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/PPC/PPCLinkingContext.cpp Fri Jan 23 13:24:32 2015<br>
@@ -8,14 +8,9 @@<br>
//===-------------------------<u></u>------------------------------<u></u>---------------===//<br>
<br>
#include "PPCLinkingContext.h"<br>
-#include "PPCTargetHandler.h"<br>
#include "lld/Core/LLVM.h"<br>
#include "llvm/ADT/StringSwitch.h"<br>
#include "llvm/Support/ErrorOr.h"<br>
<br>
using namespace lld;<br>
<br>
-elf::PPCLinkingContext::<u></u>PPCLinkingContext(llvm::Triple triple)<br>
- : ELFLinkingContext(triple, std::unique_ptr<<u></u>TargetHandlerBase>(<br>
- new PPCTargetHandler(*this))) {}<br>
-<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/PPC/PPCLinkingContext.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/PPCLinkingContext.h?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/PPC/<u></u>PPCLinkingContext.h?rev=<u></u>226928&r1=226927&r2=226928&<u></u>view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/PPC/PPCLinkingContext.h (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/PPC/PPCLinkingContext.h Fri Jan 23 13:24:32 2015<br>
@@ -10,6 +10,7 @@<br>
#ifndef LLD_READER_WRITER_ELF_PPC_PPC_<u></u>LINKING_CONTEXT_H<br>
#define LLD_READER_WRITER_ELF_PPC_PPC_<u></u>LINKING_CONTEXT_H<br>
<br>
+#include "PPCTargetHandler.h"<br>
#include "lld/ReaderWriter/<u></u>ELFLinkingContext.h"<br>
#include "llvm/Object/ELF.h"<br>
#include "llvm/Support/ELF.h"<br>
@@ -19,7 +20,9 @@ namespace elf {<br>
<br>
class PPCLinkingContext final : public ELFLinkingContext {<br>
public:<br>
- PPCLinkingContext(llvm::Triple triple);<br>
+ PPCLinkingContext(llvm::Triple triple)<br>
+ : ELFLinkingContext(triple, std::unique_ptr<<u></u>TargetHandlerBase>(<br>
+ new PPCTargetHandler(*this))) {}<br>
<br>
/// \brief PPC has no relative relocations defined<br>
bool isRelativeReloc(const Reference &) const override { return false; }<br>
<br>
Added: lld/trunk/lib/ReaderWriter/<u></u>ELF/PPC/PPCTarget.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTarget.h?rev=226928&view=auto" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/PPC/<u></u>PPCTarget.h?rev=226928&view=<u></u>auto</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/PPC/PPCTarget.h (added)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/PPC/PPCTarget.h Fri Jan 23 13:24:32 2015<br>
@@ -0,0 +1,10 @@<br>
+//===- lib/ReaderWriter/ELF/PPC/<u></u>PPCTarget.h ------------------------------<u></u>-===//<br>
+//<br>
+// The LLVM Linker<br>
+//<br>
+// This file is distributed under the University of Illinois Open Source<br>
+// License. See LICENSE.TXT for details.<br>
+//<br>
+//===------------------------<u></u>------------------------------<u></u>----------------===//<br>
+<br>
+#include "PPCLinkingContext.h"<br>
<br>
Added: lld/trunk/lib/ReaderWriter/<u></u>ELF/Targets.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Targets.h?rev=226928&view=auto" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/Targets.h?<u></u>rev=226928&view=auto</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/Targets.h (added)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/Targets.h Fri Jan 23 13:24:32 2015<br>
@@ -0,0 +1,21 @@<br>
+//===- lib/ReaderWriter/ELF/Targets.h ------------------------------<u></u>-------===//<br>
+//<br>
+// The LLVM Linker<br>
+//<br>
+// This file is distributed under the University of Illinois Open Source<br>
+// License. See LICENSE.TXT for details.<br>
+//<br>
+//===------------------------<u></u>------------------------------<u></u>----------------===//<br>
+<br>
+#ifndef LLD_READER_WRITER_ELF_TARGETS_<u></u>H<br>
+#define LLD_READER_WRITER_ELF_TARGETS_<u></u>H<br>
+<br>
+#include "AArch64/AArch64Target.h"<br>
+#include "ARM/ARMTarget.h"<br>
+#include "Hexagon/HexagonTarget.h"<br>
+#include "Mips/MipsTarget.h"<br>
+#include "PPC/PPCTarget.h"<br>
+#include "X86/X86Target.h"<br>
+#include "X86_64/X86_64Target.h"<br>
+<br>
+#endif<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/X86/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86/CMakeLists.txt?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/X86/<u></u>CMakeLists.txt?rev=226928&r1=<u></u>226927&r2=226928&view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/X86/CMakeLists.txt (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/X86/CMakeLists.txt Fri Jan 23 13:24:32 2015<br>
@@ -4,7 +4,5 @@ add_llvm_library(<u></u>lldX86ELFTarget<br>
X86RelocationHandler.cpp<br>
LINK_LIBS<br>
lldCore<br>
- lldELF<br>
- LLVMObject<br>
LLVMSupport<br>
)<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/X86/X86LinkingContext.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86/X86LinkingContext.cpp?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/X86/<u></u>X86LinkingContext.cpp?rev=<u></u>226928&r1=226927&r2=226928&<u></u>view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/X86/X86LinkingContext.cpp (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/X86/X86LinkingContext.cpp Fri Jan 23 13:24:32 2015<br>
@@ -8,13 +8,9 @@<br>
//===-------------------------<u></u>------------------------------<u></u>---------------===//<br>
<br>
#include "X86LinkingContext.h"<br>
-#include "X86TargetHandler.h"<br>
#include "lld/Core/LLVM.h"<br>
#include "llvm/ADT/StringSwitch.h"<br>
#include "llvm/Support/ErrorOr.h"<br>
<br>
using namespace lld;<br>
<br>
-elf::X86LinkingContext::<u></u>X86LinkingContext(llvm::Triple triple)<br>
- : ELFLinkingContext(triple, std::unique_ptr<<u></u>TargetHandlerBase>(<br>
- new X86TargetHandler(*this))) {}<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/X86/X86LinkingContext.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86/X86LinkingContext.h?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/X86/<u></u>X86LinkingContext.h?rev=<u></u>226928&r1=226927&r2=226928&<u></u>view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/X86/X86LinkingContext.h (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/X86/X86LinkingContext.h Fri Jan 23 13:24:32 2015<br>
@@ -10,6 +10,7 @@<br>
#ifndef LLD_READER_WRITER_ELF_X86_<u></u>TARGETINFO_H<br>
#define LLD_READER_WRITER_ELF_X86_<u></u>TARGETINFO_H<br>
<br>
+#include "X86TargetHandler.h"<br>
#include "lld/ReaderWriter/<u></u>ELFLinkingContext.h"<br>
#include "llvm/Object/ELF.h"<br>
#include "llvm/Support/ELF.h"<br>
@@ -18,7 +19,9 @@ namespace lld {<br>
namespace elf {<br>
class X86LinkingContext final : public ELFLinkingContext {<br>
public:<br>
- X86LinkingContext(llvm::<u></u>Triple);<br>
+ X86LinkingContext(llvm::Triple triple)<br>
+ : ELFLinkingContext(triple, std::unique_ptr<<u></u>TargetHandlerBase>(<br>
+ new X86TargetHandler(*this))) {}<br>
<br>
/// \brief X86 has only two relative relocation<br>
/// a) for supporting IFUNC relocs - R_386_IRELATIVE<br>
<br>
Added: lld/trunk/lib/ReaderWriter/<u></u>ELF/X86/X86Target.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86/X86Target.h?rev=226928&view=auto" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/X86/<u></u>X86Target.h?rev=226928&view=<u></u>auto</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/X86/X86Target.h (added)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/X86/X86Target.h Fri Jan 23 13:24:32 2015<br>
@@ -0,0 +1,10 @@<br>
+//===- lib/ReaderWriter/ELF/X86/<u></u>X86Target.h ------------------------------<u></u>-===//<br>
+//<br>
+// The LLVM Linker<br>
+//<br>
+// This file is distributed under the University of Illinois Open Source<br>
+// License. See LICENSE.TXT for details.<br>
+//<br>
+//===------------------------<u></u>------------------------------<u></u>----------------===//<br>
+<br>
+#include "X86LinkingContext.h"<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/X86_64/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86_64/CMakeLists.txt?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/X86_64/<u></u>CMakeLists.txt?rev=226928&r1=<u></u>226927&r2=226928&view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/X86_64/CMakeLists.txt (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/X86_64/CMakeLists.txt Fri Jan 23 13:24:32 2015<br>
@@ -5,7 +5,5 @@ add_llvm_library(lldX86_<u></u>64ELFTarget<br>
X86_64RelocationPass.cpp<br>
LINK_LIBS<br>
lldCore<br>
- lldELF<br>
- LLVMObject<br>
LLVMSupport<br>
)<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/X86_64/X86_<u></u>64DynamicLibraryWriter.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64DynamicLibraryWriter.h?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/X86_64/X86_<u></u>64DynamicLibraryWriter.h?rev=<u></u>226928&r1=226927&r2=226928&<u></u>view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/X86_64/X86_<u></u>64DynamicLibraryWriter.h (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/X86_64/X86_<u></u>64DynamicLibraryWriter.h Fri Jan 23 13:24:32 2015<br>
@@ -11,7 +11,6 @@<br>
<br>
#include "DynamicLibraryWriter.h"<br>
#include "X86_64LinkingContext.h"<br>
-#include "X86_64TargetHandler.h"<br>
<br>
namespace lld {<br>
namespace elf {<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/X86_64/X86_<u></u>64LinkingContext.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/X86_64/X86_<u></u>64LinkingContext.cpp?rev=<u></u>226928&r1=226927&r2=226928&<u></u>view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/X86_64/X86_<u></u>64LinkingContext.cpp (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/X86_64/X86_<u></u>64LinkingContext.cpp Fri Jan 23 13:24:32 2015<br>
@@ -8,15 +8,10 @@<br>
//===-------------------------<u></u>------------------------------<u></u>---------------===//<br>
<br>
#include "X86_64LinkingContext.h"<br>
-#include "X86_64TargetHandler.h"<br>
#include "X86_64RelocationPass.h"<br>
<br>
using namespace lld;<br>
<br>
-elf::X86_64LinkingContext::<u></u>X86_64LinkingContext(llvm::<u></u>Triple triple)<br>
- : ELFLinkingContext(triple, std::unique_ptr<<u></u>TargetHandlerBase>(<br>
- new X86_64TargetHandler(*this))) {}<br>
-<br>
void elf::X86_64LinkingContext::<u></u>addPasses(PassManager &pm) {<br>
auto pass = createX86_64RelocationPass(*<u></u>this);<br>
if (pass)<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>ELF/X86_64/X86_<u></u>64LinkingContext.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.h?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/X86_64/X86_<u></u>64LinkingContext.h?rev=226928&<u></u>r1=226927&r2=226928&view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/X86_64/X86_<u></u>64LinkingContext.h (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/X86_64/X86_<u></u>64LinkingContext.h Fri Jan 23 13:24:32 2015<br>
@@ -10,6 +10,7 @@<br>
#ifndef LLD_READER_WRITER_ELF_X86_64_<u></u>X86_64_LINKING_CONTEXT_H<br>
#define LLD_READER_WRITER_ELF_X86_64_<u></u>X86_64_LINKING_CONTEXT_H<br>
<br>
+#include "X86_64TargetHandler.h"<br>
#include "lld/ReaderWriter/<u></u>ELFLinkingContext.h"<br>
#include "llvm/Object/ELF.h"<br>
#include "llvm/Support/ELF.h"<br>
@@ -26,7 +27,9 @@ enum {<br>
<br>
class X86_64LinkingContext final : public ELFLinkingContext {<br>
public:<br>
- X86_64LinkingContext(llvm::<u></u>Triple);<br>
+ X86_64LinkingContext(llvm::<u></u>Triple triple)<br>
+ : ELFLinkingContext(triple, std::unique_ptr<<u></u>TargetHandlerBase>(<br>
+ new X86_64TargetHandler(*this))) {}<br>
<br>
void addPasses(PassManager &) override;<br>
<br>
<br>
Added: lld/trunk/lib/ReaderWriter/<u></u>ELF/X86_64/X86_64Target.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64Target.h?rev=226928&view=auto" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/ELF/X86_64/X86_<u></u>64Target.h?rev=226928&view=<u></u>auto</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>ELF/X86_64/X86_64Target.h (added)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>ELF/X86_64/X86_64Target.h Fri Jan 23 13:24:32 2015<br>
@@ -0,0 +1,10 @@<br>
+//===- lib/ReaderWriter/ELF/X86_64/<u></u>X86_64Target.h -------------------------===//<br>
+//<br>
+// The LLVM Linker<br>
+//<br>
+// This file is distributed under the University of Illinois Open Source<br>
+// License. See LICENSE.TXT for details.<br>
+//<br>
+//===------------------------<u></u>------------------------------<u></u>----------------===//<br>
+<br>
+#include "X86_64LinkingContext.h"<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>MachO/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/CMakeLists.txt?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/MachO/CMakeLists.<u></u>txt?rev=226928&r1=226927&r2=<u></u>226928&view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>MachO/CMakeLists.txt (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>MachO/CMakeLists.txt Fri Jan 23 13:24:32 2015<br>
@@ -16,10 +16,8 @@ add_llvm_library(lldMachO<br>
StubsPass.cpp<br>
WriterMachO.cpp<br>
LINK_LIBS<br>
- lldCore<br>
+ lldReaderWriter<br>
lldPasses<br>
- lldYAML<br>
- LLVMObject<br>
LLVMSupport<br>
)<br>
<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>MachO/Makefile<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/Makefile?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/MachO/Makefile?<u></u>rev=226928&r1=226927&r2=<u></u>226928&view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>MachO/Makefile (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>MachO/Makefile Fri Jan 23 13:24:32 2015<br>
@@ -9,6 +9,6 @@<br>
<br>
LLD_LEVEL := ../../..<br>
LIBRARYNAME := lldMachO<br>
-USEDLIBS = lldCore.a<br>
+USEDLIBS = lldReaderWriter.a lldCore.a<br>
<br>
include $(LLD_LEVEL)/Makefile<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>PECOFF/CMakeLists.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/CMakeLists.txt?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/PECOFF/<u></u>CMakeLists.txt?rev=226928&r1=<u></u>226927&r2=226928&view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>PECOFF/CMakeLists.txt (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>PECOFF/CMakeLists.txt Fri Jan 23 13:24:32 2015<br>
@@ -10,8 +10,7 @@ add_llvm_library(lldPECOFF<br>
WriterImportLibrary.cpp<br>
WriterPECOFF.cpp<br>
LINK_LIBS<br>
- lldCore<br>
- lldPasses<br>
+ lldReaderWriter<br>
LLVMObject<br>
LLVMSupport<br>
)<br>
<br>
Modified: lld/trunk/lib/ReaderWriter/<u></u>PECOFF/Makefile<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/Makefile?rev=226928&r1=226927&r2=226928&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lld/trunk/lib/<u></u>ReaderWriter/PECOFF/Makefile?<u></u>rev=226928&r1=226927&r2=<u></u>226928&view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lld/trunk/lib/ReaderWriter/<u></u>PECOFF/Makefile (original)<br>
+++ lld/trunk/lib/ReaderWriter/<u></u>PECOFF/Makefile Fri Jan 23 13:24:32 2015<br>
@@ -9,6 +9,6 @@<br>
<br>
LLD_LEVEL := ../../..<br>
LIBRARYNAME := lldPECOFF<br>
-USEDLIBS = lldCore.a<br>
+USEDLIBS = lldReaderWriter.a lldCore.a<br>
<br>
include $(LLD_LEVEL)/Makefile<br>
<br>
<br>
______________________________<u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div>