summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/GOTPass.hpp
diff options
context:
space:
mode:
authorNick Kledzik <kledzik@apple.com>2012-05-31 22:34:00 +0000
committerNick Kledzik <kledzik@apple.com>2012-05-31 22:34:00 +0000
commitabb6981f68a0cf631b6d7d36e67127bb1af50713 (patch)
tree63d6fd7aeef209f7528fecf1a151df50f61f7fa9 /lld/lib/ReaderWriter/MachO/GOTPass.hpp
parent5168a72b2628288c5ba3143745554e2eadbb67b0 (diff)
downloadbcm5719-llvm-abb6981f68a0cf631b6d7d36e67127bb1af50713.tar.gz
bcm5719-llvm-abb6981f68a0cf631b6d7d36e67127bb1af50713.zip
Major refactoring: Remove Platform concept. In its place there are
now Reader and Writer subclasses for each file format. Each Reader and Writer subclass defines an "options" class which controls how that Reader or Writer operates. llvm-svn: 157774
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/GOTPass.hpp')
-rw-r--r--lld/lib/ReaderWriter/MachO/GOTPass.hpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/lld/lib/ReaderWriter/MachO/GOTPass.hpp b/lld/lib/ReaderWriter/MachO/GOTPass.hpp
new file mode 100644
index 00000000000..6a7c451e448
--- /dev/null
+++ b/lld/lib/ReaderWriter/MachO/GOTPass.hpp
@@ -0,0 +1,51 @@
+//===- lib/ReaderWriter/MachO/GOTPass.hpp ---------------------------------===//
+//
+// The LLVM Linker
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLD_READER_WRITER_MACHO_GOT_PASS_H_
+#define LLD_READER_WRITER_MACHO_GOT_PASS_H_
+
+#include "lld/Core/DefinedAtom.h"
+#include "lld/Core/SharedLibraryAtom.h"
+#include "lld/Core/File.h"
+#include "lld/Core/Reference.h"
+#include "lld/Core/Pass.h"
+
+#include "ReferenceKinds.h"
+#include "StubAtoms.hpp"
+
+namespace lld {
+namespace mach_o {
+
+
+class GOTPass : public lld::GOTPass {
+public:
+ virtual bool noTextRelocs() {
+ return true;
+ }
+
+ virtual bool isGOTAccess(Reference::Kind, bool& canBypassGOT) {
+ return false;
+ }
+
+ virtual void updateReferenceToGOT(const Reference*, bool targetIsNowGOT) {
+
+ }
+
+ virtual const DefinedAtom* makeGOTEntry(const Atom&) {
+ return nullptr;
+ }
+
+};
+
+
+} // namespace mach_o
+} // namespace lld
+
+
+#endif // LLD_READER_WRITER_MACHO_GOT_PASS_H_
OpenPOWER on IntegriCloud