diff options
Diffstat (limited to 'lld/lib/ReaderWriter/ELF/DefaultTargetHandler.h')
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/DefaultTargetHandler.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lld/lib/ReaderWriter/ELF/DefaultTargetHandler.h b/lld/lib/ReaderWriter/ELF/DefaultTargetHandler.h index 143bffdde80..b2cb5d5e001 100644 --- a/lld/lib/ReaderWriter/ELF/DefaultTargetHandler.h +++ b/lld/lib/ReaderWriter/ELF/DefaultTargetHandler.h @@ -12,6 +12,7 @@ #include "DefaultLayout.h" #include "TargetHandler.h" +#include "ELFReader.h" #include "lld/ReaderWriter/ELFLinkingContext.h" @@ -32,11 +33,6 @@ public: llvm_unreachable("Target should provide implementation for function "); } - /// TargetAtomHandler - TargetAtomHandler<ELFT> &targetAtomHandler() { - llvm_unreachable("Target should provide implementation for function "); - } - const TargetRelocationHandler<ELFT> &getRelocationHandler() const { llvm_unreachable("Target should provide implementation for function "); } @@ -74,7 +70,15 @@ public: DefaultLayout<ELFT>::ORDER_DYNAMIC_SYMBOLS)); } -private: + virtual std::unique_ptr<Reader> getObjReader(bool atomizeStrings) { + return std::unique_ptr<Reader>(new ELFObjectReader(atomizeStrings)); + } + + virtual std::unique_ptr<Reader> getDSOReader(bool useShlibUndefines) { + return std::unique_ptr<Reader>(new ELFDSOReader(useShlibUndefines)); + } + +protected: llvm::BumpPtrAllocator _alloc; }; } // end namespace elf |

