summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF/PPC/PPCLinkingContext.h
blob: 782f7cd607be8aca0b625b1403c503ebe04a917d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//===- 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 "PPCTargetHandler.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:
  PPCLinkingContext(llvm::Triple triple)
      : ELFLinkingContext(triple, std::unique_ptr<TargetHandlerBase>(
                                      new PPCTargetHandler(*this))) {}

  virtual bool isLittleEndian() const { return false; }

  /// \brief PPC has no relative relocations defined
  virtual bool isRelativeReloc(const Reference &) const { return false; }
};

} // elf
} // lld

#endif // LLD_READER_WRITER_ELF_PPC_PPC_LINKING_CONTEXT_H
OpenPOWER on IntegriCloud