diff options
| author | Shankar Easwaran <shankare@codeaurora.org> | 2014-01-27 01:02:03 +0000 |
|---|---|---|
| committer | Shankar Easwaran <shankare@codeaurora.org> | 2014-01-27 01:02:03 +0000 |
| commit | e7b831ad354c74ef9fb12b8501e4c5de676a2bc6 (patch) | |
| tree | dd5307b45131ff4c4f907f7ec3417f80208e6ee6 /lld/lib/ReaderWriter/ELF/DefaultTargetHandler.h | |
| parent | 51577b66ce478fafc3cbd7614255742ceff65237 (diff) | |
| download | bcm5719-llvm-e7b831ad354c74ef9fb12b8501e4c5de676a2bc6.tar.gz bcm5719-llvm-e7b831ad354c74ef9fb12b8501e4c5de676a2bc6.zip | |
[ELF] Add Target specific Readers.
No change in functionality.
llvm-svn: 200175
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 |

