Reinstate r91208 to fix available_externally linkage for globals, with

nlewycky's fix to add -rdynamic so the JIT can look symbols up in Linux builds
of the JITTests binary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91250 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jeffrey Yasskin
2009-12-13 20:30:32 +00:00
parent c4174d675b
commit 898e9df8db
3 changed files with 29 additions and 1 deletions

View File

@ -681,7 +681,7 @@ void *JIT::getOrEmitGlobalVariable(const GlobalVariable *GV) {
if (Ptr) return Ptr;
// If the global is external, just remember the address.
if (GV->isDeclaration()) {
if (GV->isDeclaration() || GV->hasAvailableExternallyLinkage()) {
#if HAVE___DSO_HANDLE
if (GV->getName() == "__dso_handle")
return (void*)&__dso_handle;