diff options
author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2013-08-21 07:28:48 +0000 |
---|---|---|
committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2013-08-21 07:28:48 +0000 |
commit | 0f4a5ba24e680f5193792822c9dd066bfccdfc2d (patch) | |
tree | fb8ffdbda2b535599e9dce8bf8e8bff1bc95038a /include | |
parent | 0e83b902834530da4670ad8416cf44afba9b4111 (diff) | |
download | external_llvm-0f4a5ba24e680f5193792822c9dd066bfccdfc2d.zip external_llvm-0f4a5ba24e680f5193792822c9dd066bfccdfc2d.tar.gz external_llvm-0f4a5ba24e680f5193792822c9dd066bfccdfc2d.tar.bz2 |
MC CFG: Add an MCObjectSymbolizer in the MCObjectDisassembler.
Used to detect calls to function symbol stubs (future commit).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188887 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/MC/MCObjectDisassembler.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/MC/MCObjectDisassembler.h b/include/llvm/MC/MCObjectDisassembler.h index 4ac3456..ab317e3 100644 --- a/include/llvm/MC/MCObjectDisassembler.h +++ b/include/llvm/MC/MCObjectDisassembler.h @@ -31,6 +31,7 @@ class MCDisassembler; class MCFunction; class MCInstrAnalysis; class MCModule; +class MCObjectSymbolizer; /// \brief Disassemble an ObjectFile to an MCModule and MCFunctions. /// This class builds on MCDisassembler to disassemble whole sections, creating @@ -54,6 +55,13 @@ public: MCModule *buildEmptyModule(); + /// \brief Set the symbolizer to use to get information on external functions. + /// Note that this isn't used to do instruction-level symbolization (that is, + /// plugged into MCDisassembler), but to symbolize function call targets. + void setSymbolizer(MCObjectSymbolizer *ObjectSymbolizer) { + MOS = ObjectSymbolizer; + } + /// \brief Get the effective address of the entrypoint, or 0 if there is none. virtual uint64_t getEntrypoint(); @@ -86,6 +94,7 @@ protected: const object::ObjectFile &Obj; const MCDisassembler &Dis; const MCInstrAnalysis &MIA; + MCObjectSymbolizer *MOS; private: /// \brief Fill \p Module by creating an atom for each section. |