mirror of
git://git.savannah.gnu.org/libtool.git
synced 2024-11-27 06:09:57 +08:00
* libltdl/m4/ltdl.m4 (_LTDL_SETUP): Define
LTDL_DLOPEN_SELF_WORKS, depending upon lt_cv_dlopen_self. * libltdl/loaders/dlopen.c (vm_open) [!LTDL_DLOPEN_SELF_WORKS]: Fail for dlopen(NULL), so that the preopen loader is used. This fixes mdemo-exec.test failures on AIX where dlopen(NULL) succeeds but dlsym resolves no symbol. * NEWS: Update. Report by Rainer Tammer.
This commit is contained in:
parent
12108ff510
commit
75142db4f8
@ -1,5 +1,14 @@
|
||||
2008-01-12 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* libltdl/m4/ltdl.m4 (_LTDL_SETUP): Define
|
||||
LTDL_DLOPEN_SELF_WORKS, depending upon lt_cv_dlopen_self.
|
||||
* libltdl/loaders/dlopen.c (vm_open) [!LTDL_DLOPEN_SELF_WORKS]:
|
||||
Fail for dlopen(NULL), so that the preopen loader is used. This
|
||||
fixes mdemo-exec.test failures on AIX where dlopen(NULL)
|
||||
succeeds but dlsym resolves no symbol.
|
||||
* NEWS: Update.
|
||||
Report by Rainer Tammer.
|
||||
|
||||
* tests/am-subdir.at: Drop unused variables.
|
||||
* tests/configure-iface.at: Likewise.
|
||||
* tests/ctor.at: Likewise.
|
||||
|
1
NEWS
1
NEWS
@ -116,6 +116,7 @@ New in 2.1a: 2008-??-??; CVS version 2.1a, Libtool team:
|
||||
- Some configure variables have been renamed to fix caching:
|
||||
lt_prog_compiler_pic_works to lt_cv_prog_compiler_pic_works
|
||||
lt_prog_compiler_static_works to lt_cv_prog_compiler_static_works.
|
||||
- Fix 1.9b regression: lt_dlopen(NULL) works on AIX again.
|
||||
- Loads of smaller bug fixes.
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* loader-dlopen.c -- dynamic linking with dlopen/dlsym
|
||||
|
||||
Copyright (C) 1998, 1999, 2000, 2004, 2006,
|
||||
2007 Free Software Foundation, Inc.
|
||||
2007, 2008 Free Software Foundation, Inc.
|
||||
Written by Thomas Tanner, 1998
|
||||
|
||||
NOTE: The canonical source of this file is maintained with the
|
||||
@ -178,6 +178,13 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
|
||||
#endif
|
||||
}
|
||||
|
||||
/* On AIX, dlopen(NULL) succeeds but dlsym of symbols fails.
|
||||
In this case, fail here to let the preopen loader do the job. */
|
||||
#ifndef LTDL_DLOPEN_SELF_WORKS
|
||||
if (!filename)
|
||||
module = NULL;
|
||||
else
|
||||
#endif
|
||||
module = dlopen (filename, module_flags);
|
||||
|
||||
if (!module)
|
||||
|
@ -338,6 +338,12 @@ m4_require([_LT_HEADER_DLFCN])dnl
|
||||
m4_require([_LT_CHECK_DLPREOPEN])dnl
|
||||
m4_require([_LT_DECL_SED])dnl
|
||||
|
||||
# lt_cv_dlopen_self gets defined by LT_SYS_DLOPEN_SELF, called by LT_INIT
|
||||
if test "$lt_cv_dlopen_self" = yes; then
|
||||
AC_DEFINE([LTDL_DLOPEN_SELF_WORKS], [1],
|
||||
[Define if dlopen(NULL) is able to resolve symbols from the main program.])
|
||||
fi
|
||||
|
||||
dnl Don't require this, or it will be expanded earlier than the code
|
||||
dnl that sets the variables it relies on:
|
||||
_LT_ENABLE_INSTALL
|
||||
|
Loading…
Reference in New Issue
Block a user