template <class ELFT> class AArch64TargetLayout;
-class AArch64TargetRelocationHandler final
- : public TargetRelocationHandler<AArch64ELFType> {
+class AArch64TargetRelocationHandler final : public TargetRelocationHandler {
public:
AArch64TargetRelocationHandler(ELFLinkingContext &targetInfo)
- : TargetRelocationHandler<AArch64ELFType>(targetInfo) {}
+ : TargetRelocationHandler(targetInfo) {}
std::error_code applyRelocation(ELFWriter &, llvm::FileOutputBuffer &,
const lld::AtomLayout &,
DefaultTargetHandler(ELFLinkingContext &context)
: TargetHandler<ELFT>(context) {}
- const TargetRelocationHandler<ELFT> &getRelocationHandler() const = 0;
+ const TargetRelocationHandler &getRelocationHandler() const = 0;
virtual std::unique_ptr<Reader> getObjReader(bool atomizeStrings) = 0;
class HexagonTargetHandler;
-class HexagonTargetRelocationHandler final :
- public TargetRelocationHandler<HexagonELFType> {
+class HexagonTargetRelocationHandler final : public TargetRelocationHandler {
public:
HexagonTargetRelocationHandler(HexagonTargetLayout<HexagonELFType> &layout,
ELFLinkingContext &targetInfo)
- : TargetRelocationHandler<HexagonELFType>(targetInfo),
- _hexagonTargetLayout(layout) {}
+ : TargetRelocationHandler(targetInfo), _hexagonTargetLayout(layout) {}
std::error_code applyRelocation(ELFWriter &, llvm::FileOutputBuffer &,
const lld::AtomLayout &,
class MipsTargetHandler;
-class MipsTargetRelocationHandler final
- : public TargetRelocationHandler<Mips32ElELFType> {
+class MipsTargetRelocationHandler final : public TargetRelocationHandler {
public:
MipsTargetRelocationHandler(MipsTargetLayout<Mips32ElELFType> &layout,
ELFLinkingContext &targetInfo)
- : TargetRelocationHandler<Mips32ElELFType>(targetInfo),
- _mipsTargetLayout(layout) {}
+ : TargetRelocationHandler(targetInfo), _mipsTargetLayout(layout) {}
std::error_code applyRelocation(ELFWriter &, llvm::FileOutputBuffer &,
const lld::AtomLayout &,
PPCTargetLayout(PPCLinkingContext &context) : TargetLayout<ELFT>(context) {}
};
-class PPCTargetRelocationHandler final
- : public TargetRelocationHandler<PPCELFType> {
+class PPCTargetRelocationHandler final : public TargetRelocationHandler {
public:
PPCTargetRelocationHandler(ELFLinkingContext &context)
- : TargetRelocationHandler<PPCELFType>(context) {}
+ : TargetRelocationHandler(context) {}
std::error_code applyRelocation(ELFWriter &, llvm::FileOutputBuffer &,
const lld::AtomLayout &,
return;
uint8_t *atomContent = chunkBuffer + ai->_fileOffset;
std::memcpy(atomContent, content.data(), contentSize);
- const TargetRelocationHandler<ELFT> &relHandler =
+ const TargetRelocationHandler &relHandler =
this->_context.template getTargetHandler<ELFT>().getRelocationHandler();
for (const auto ref : *definedAtom)
relHandler.applyRelocation(*writer, buffer, *ai, *ref);
template <class ELFT> class Section;
template <class ELFT> class TargetLayout;
-template <class ELFT> class TargetRelocationHandler {
+class TargetRelocationHandler {
public:
/// Constructor
TargetRelocationHandler(ELFLinkingContext &targetInfo)
virtual TargetLayout<ELFT> &getTargetLayout() = 0;
/// Determine how relocations need to be applied.
- virtual const TargetRelocationHandler<ELFT> &getRelocationHandler() const = 0;
+ virtual const TargetRelocationHandler &getRelocationHandler() const = 0;
/// How does the target deal with reading input files.
virtual std::unique_ptr<Reader> getObjReader(bool) = 0;
namespace lld {
namespace elf {
-template <class ELFT> class X86TargetLayout;
typedef llvm::object::ELFType<llvm::support::little, 2, false> X86ELFType;
-class X86TargetRelocationHandler final
- : public TargetRelocationHandler<X86ELFType> {
+class X86TargetRelocationHandler final : public TargetRelocationHandler {
public:
X86TargetRelocationHandler(ELFLinkingContext &targetInfo)
- : TargetRelocationHandler<X86ELFType>(targetInfo) {}
+ : TargetRelocationHandler(targetInfo) {}
std::error_code applyRelocation(ELFWriter &, llvm::FileOutputBuffer &,
const lld::AtomLayout &,
template <class ELFT> class X86_64TargetLayout;
-class X86_64TargetRelocationHandler final
- : public TargetRelocationHandler<X86_64ELFType> {
+class X86_64TargetRelocationHandler final : public TargetRelocationHandler {
public:
X86_64TargetRelocationHandler(X86_64TargetLayout<X86_64ELFType> &layout,
ELFLinkingContext &targetInfo)
- : TargetRelocationHandler<X86_64ELFType>(targetInfo),
- _tlsSize(0), _x86_64Layout(layout) {}
+ : TargetRelocationHandler(targetInfo), _tlsSize(0),
+ _x86_64Layout(layout) {}
std::error_code applyRelocation(ELFWriter &, llvm::FileOutputBuffer &,
const lld::AtomLayout &,