Files
clang-p2996/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.h
Simon Atanasyan f08deab395 [Mips] Remove unused class field.
llvm-svn: 203398
2014-03-09 13:04:45 +00:00

51 lines
1.6 KiB
C++

//===- 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) {}
~MipsTargetRelocationHandler();
error_code applyRelocation(ELFWriter &, llvm::FileOutputBuffer &,
const lld::AtomLayout &,
const Reference &) const override;
private:
typedef std::vector<const Reference *> PairedRelocationsT;
typedef std::unordered_map<const lld::AtomLayout *, PairedRelocationsT>
PairedRelocationMapT;
mutable PairedRelocationMapT _pairedRelocations;
void savePairedRelocation(const lld::AtomLayout &atom,
const Reference &ref) const;
void applyPairedRelocations(ELFWriter &writer, llvm::FileOutputBuffer &buf,
const lld::AtomLayout &atom, int64_t gpAddr,
int64_t loAddend) const;
MipsTargetLayout<Mips32ElELFType> &_mipsTargetLayout;
};
} // elf
} // lld
#endif