summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.h
blob: 35ff6823b65a17a055f639b4e91b1c46eb6e4e60 (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
//===- lld/ReaderWriter/ELF/Mips/MipsRelocationHandler.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_MIPS_MIPS_RELOCATION_HANDLER_H
#define LLD_READER_WRITER_ELF_MIPS_MIPS_RELOCATION_HANDLER_H

#include "MipsLinkingContext.h"

namespace lld {
namespace elf {

class MipsTargetHandler;

class MipsTargetRelocationHandler final
    : public TargetRelocationHandler<Mips32ElELFType> {
public:
  MipsTargetRelocationHandler(MipsTargetLayout<Mips32ElELFType> &layout)
      : _mipsTargetLayout(layout) {}

  std::error_code applyRelocation(ELFWriter &, llvm::FileOutputBuffer &,
                                  const lld::AtomLayout &,
                                  const Reference &) const override;

private:
  MipsTargetLayout<Mips32ElELFType> &_mipsTargetLayout;
};

} // elf
} // lld

#endif
OpenPOWER on IntegriCloud