From 940b2a20f1cd490afb6e541a3cd26f0d3bdd1687 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 10 Jul 2017 21:17:41 +0200 Subject: Revert "COMMON: Change way the Singleton instances are instantiated" This reverts commit eefa72afa1978a9dea10f5b1833fcc8f58a3468e. With this patch ConfigManager is broken. --- backends/plugins/elf/memory-manager.cpp | 4 ++++ backends/plugins/elf/shorts-segment-manager.cpp | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'backends/plugins/elf') diff --git a/backends/plugins/elf/memory-manager.cpp b/backends/plugins/elf/memory-manager.cpp index 7be79434bf..5014718ae8 100644 --- a/backends/plugins/elf/memory-manager.cpp +++ b/backends/plugins/elf/memory-manager.cpp @@ -29,6 +29,10 @@ #include "common/util.h" #include +namespace Common { +DECLARE_SINGLETON(ELFMemoryManager); +} + ELFMemoryManager::ELFMemoryManager() : _heap(0), _heapSize(0), _heapAlign(0), _trackAllocs(false), _measuredSize(0), _measuredAlign(0), diff --git a/backends/plugins/elf/shorts-segment-manager.cpp b/backends/plugins/elf/shorts-segment-manager.cpp index 2af6c10e0f..4fa03cc79c 100644 --- a/backends/plugins/elf/shorts-segment-manager.cpp +++ b/backends/plugins/elf/shorts-segment-manager.cpp @@ -33,6 +33,10 @@ extern char __plugin_hole_start; // Indicates start of hole in program file for extern char __plugin_hole_end; // Indicates end of hole in program file extern char _gp[]; // Value of gp register +namespace Common { +DECLARE_SINGLETON(ShortSegmentManager); // For singleton +} + ShortSegmentManager::ShortSegmentManager() { _shortsStart = &__plugin_hole_start ; //shorts segment begins at the plugin hole we made when linking _shortsEnd = &__plugin_hole_end; //and ends at the end of that hole. -- cgit v1.2.3