diff options
author | Pavel Labath <labath@google.com> | 2018-05-24 12:44:18 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2018-05-24 12:44:18 +0000 |
commit | bab2b9dc4896eb35648dd1f3a17b6bf441783a31 (patch) | |
tree | a6a89dfdebfdb5748aa10a2ccb011dd62b1888e4 /source/Initialization/SystemInitializerCommon.cpp | |
parent | e08a82830fd729c6fcb1d0661cfc54ab5dd4db82 (diff) |
Move ObjectFile initialization out of SystemInitializerCommon
Summary:
For lldb-server, it is sufficient to parse only the native object file
format for its target OS (no other file can be loaded into a running
process). This moves the object file initialization code into specific
initializer classes: lldb-test and liblldb get all object files;
lldb-server gets only one of them. For this to work, I've needed to
create a special SystemInitializer for use in lldb-server, instead of it
calling directly into the common one.
This reduces the size of lldb-server by about 2%, which is not
earth-shattering, but it's an easy win, and it helps.
Reviewers: zturner, clayborg
Subscribers: mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D47250
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@333182 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'source/Initialization/SystemInitializerCommon.cpp')
-rw-r--r-- | source/Initialization/SystemInitializerCommon.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/source/Initialization/SystemInitializerCommon.cpp b/source/Initialization/SystemInitializerCommon.cpp index 74a53e4ff..7809fbe2f 100644 --- a/source/Initialization/SystemInitializerCommon.cpp +++ b/source/Initialization/SystemInitializerCommon.cpp @@ -14,14 +14,11 @@ #include "Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h" #include "Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h" #include "Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h" -#include "Plugins/ObjectFile/ELF/ObjectFileELF.h" -#include "Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h" #include "Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h" #include "lldb/Host/Host.h" #include "lldb/Host/HostInfo.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/Timer.h" -#include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h" #if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) #include "Plugins/Process/POSIX/ProcessPOSIXLog.h" @@ -78,9 +75,6 @@ void SystemInitializerCommon::Initialize() { // Initialize plug-ins ObjectContainerBSDArchive::Initialize(); - ObjectFileELF::Initialize(); - ObjectFileMachO::Initialize(); - ObjectFilePECOFF::Initialize(); EmulateInstructionARM::Initialize(); EmulateInstructionMIPS::Initialize(); @@ -103,9 +97,6 @@ void SystemInitializerCommon::Terminate() { static Timer::Category func_cat(LLVM_PRETTY_FUNCTION); Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION); ObjectContainerBSDArchive::Terminate(); - ObjectFileELF::Terminate(); - ObjectFileMachO::Terminate(); - ObjectFilePECOFF::Terminate(); EmulateInstructionARM::Terminate(); EmulateInstructionMIPS::Terminate(); |