diff options
author | Basile Starynkevitch <basile@starynkevitch.net> | 2009-07-09 17:57:14 +0000 |
---|---|---|
committer | Basile Starynkevitch <bstarynk@gcc.gnu.org> | 2009-07-09 17:57:14 +0000 |
commit | 8d4cf6d7c368be7d5e1b7302f6639ca540649d05 (patch) | |
tree | 13574a26da2449b731d606de92e0fecc392d78f1 /gcc | |
parent | 8be2c87161b7db3a5067bd0e1a5b5565744680a2 (diff) | |
download | gcc-8d4cf6d7c368be7d5e1b7302f6639ca540649d05.zip gcc-8d4cf6d7c368be7d5e1b7302f6639ca540649d05.tar.gz gcc-8d4cf6d7c368be7d5e1b7302f6639ca540649d05.tar.bz2 |
plugin.c (try_init_one_plugin): passes RTLD_GLOBAL to dlopen.
2009-07-09 Basile Starynkevitch <basile@starynkevitch.net>
* gcc/plugin.c (try_init_one_plugin): passes RTLD_GLOBAL to dlopen.
From-SVN: r149424
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/plugin.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cc7e186..114d4a1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ + +2009-07-09 Basile Starynkevitch <basile@starynkevitch.net> + + * plugin.c (try_init_one_plugin): passes RTLD_GLOBAL to dlopen. + 2009-07-09 Jakub Jelinek <jakub@redhat.com> PR middle-end/40692 diff --git a/gcc/plugin.c b/gcc/plugin.c index f657850..9060683 100644 --- a/gcc/plugin.c +++ b/gcc/plugin.c @@ -592,7 +592,11 @@ try_init_one_plugin (struct plugin_name_args *plugin) char *err; PTR_UNION_TYPE (plugin_init_func) plugin_init_union; - dl_handle = dlopen (plugin->full_name, RTLD_NOW); + /* We use RTLD_NOW to accelerate binding and detect any mismatch + between the API expected by the plugin and the GCC API; we use + RTLD_GLOBAL which is useful to plugins which themselves call + dlopen. */ + dl_handle = dlopen (plugin->full_name, RTLD_NOW | RTLD_GLOBAL); if (!dl_handle) { error ("Cannot load plugin %s\n%s", plugin->full_name, dlerror ()); |