From 719ddd5298b423b1c3037d2351cb35e42f89522d Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Sun, 11 Dec 2011 21:43:19 +0000 Subject: Patch by Paul Marinescu that fixes an issue causing KLEE to fail on some platforms with KLEE: ERROR: unable to load symbol(__dso_handle) while initializing globals. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@146351 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Core/Executor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') 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()); -- cgit 1.4.1