about summary refs log tree commit diff homepage
path: root/lib/Core/Executor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Core/Executor.cpp')
-rw-r--r--lib/Core/Executor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index a768ec38..6abd0234 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -428,6 +428,9 @@ MemoryObject * Executor::addExternalObject(ExecutionState &state,
   return mo;
 }
 
+
+extern void *__dso_handle __attribute__ ((__weak__));
+
 void Executor::initializeGlobals(ExecutionState &state) {
   Module *m = kmodule->module;
 
@@ -532,7 +535,6 @@ void Executor::initializeGlobals(ExecutionState &state) {
       if (size) {
         void *addr;
         if (i->getName() == "__dso_handle") {
-          extern void *__dso_handle __attribute__ ((__weak__));
           addr = &__dso_handle; // wtf ?
         } else {
           addr = externalDispatcher->resolveSymbol(i->getName());