using namespace elf;
AArch64TargetHandler::AArch64TargetHandler(AArch64LinkingContext &context)
- : DefaultTargetHandler(context), _context(context),
+ : _context(context),
_AArch64TargetLayout(new AArch64TargetLayout<AArch64ELFType>(context)),
- _AArch64RelocationHandler(
- new AArch64TargetRelocationHandler(context)) {}
+ _AArch64RelocationHandler(new AArch64TargetRelocationHandler(context)) {}
void AArch64TargetHandler::registerRelocationNames(Registry ®istry) {
registry.addKindTable(Reference::KindNamespace::ELF,
template <class ELFT>
class DefaultTargetHandler : public TargetHandler<ELFT> {
public:
- DefaultTargetHandler(ELFLinkingContext &context)
- : TargetHandler<ELFT>(context) {}
-
const TargetRelocationHandler &getRelocationHandler() const = 0;
virtual std::unique_ptr<Reader> getObjReader(bool atomizeStrings) = 0;
using llvm::makeArrayRef;
HexagonTargetHandler::HexagonTargetHandler(HexagonLinkingContext &context)
- : DefaultTargetHandler(context), _hexagonLinkingContext(context),
+ : _hexagonLinkingContext(context),
_hexagonRuntimeFile(new HexagonRuntimeFile<HexagonELFType>(context)),
_hexagonTargetLayout(new HexagonTargetLayout<HexagonELFType>(context)),
_hexagonRelocationHandler(new HexagonTargetRelocationHandler(
typedef llvm::object::ELFType<llvm::support::little, 2, false> Mips32ElELFType;
MipsTargetHandler::MipsTargetHandler(MipsLinkingContext &ctx)
- : DefaultTargetHandler(ctx), _ctx(ctx),
- _runtimeFile(new MipsRuntimeFile<Mips32ElELFType>(ctx)),
+ : _ctx(ctx), _runtimeFile(new MipsRuntimeFile<Mips32ElELFType>(ctx)),
_targetLayout(new MipsTargetLayout<Mips32ElELFType>(ctx)),
- _relocationHandler(new MipsTargetRelocationHandler(*_targetLayout, ctx)) {}
+ _relocationHandler(new MipsTargetRelocationHandler(*_targetLayout, ctx)) {
+}
std::unique_ptr<Writer> MipsTargetHandler::getWriter() {
switch (_ctx.getOutputELFType()) {
}
PPCTargetHandler::PPCTargetHandler(PPCLinkingContext &context)
- : DefaultTargetHandler(context), _ppcLinkingContext(context),
+ : _ppcLinkingContext(context),
_ppcTargetLayout(new PPCTargetLayout<PPCELFType>(context)),
_ppcRelocationHandler(new PPCTargetRelocationHandler(context)) {}
/// of creating atoms and how the atoms are written to the output file.
template <class ELFT> class TargetHandler : public TargetHandlerBase {
public:
- /// Constructor
- TargetHandler(ELFLinkingContext &targetInfo) {}
-
/// The layout determined completely by the Target.
virtual TargetLayout<ELFT> &getTargetLayout() = 0;
}
X86TargetHandler::X86TargetHandler(X86LinkingContext &context)
- : DefaultTargetHandler(context), _x86LinkingContext(context),
+ : _x86LinkingContext(context),
_x86TargetLayout(new X86TargetLayout<X86ELFType>(context)),
- _x86RelocationHandler(
- new X86TargetRelocationHandler(context)) {}
+ _x86RelocationHandler(new X86TargetRelocationHandler(context)) {}
using namespace elf;
X86_64TargetHandler::X86_64TargetHandler(X86_64LinkingContext &context)
- : DefaultTargetHandler(context), _context(context),
+ : _context(context),
_x86_64TargetLayout(new X86_64TargetLayout<X86_64ELFType>(context)),
- _x86_64RelocationHandler(
- new X86_64TargetRelocationHandler(*_x86_64TargetLayout.get(),
- context)) {}
+ _x86_64RelocationHandler(new X86_64TargetRelocationHandler(
+ *_x86_64TargetLayout.get(), context)) {}
void X86_64TargetHandler::registerRelocationNames(Registry ®istry) {
registry.addKindTable(Reference::KindNamespace::ELF,