From schwab@redhat.com Wed May 5 08:27:00 2010 From: schwab@redhat.com (Andreas Schwab) Date: Wed, 05 May 2010 08:27:00 -0000 Subject: [PATCH] Fix lookup of collation sequence value during regexp matching Message-ID: 2010-05-04 Andreas Schwab * posix/regexec.c (find_collation_sequence_value): Fix skipping the wide char sequence of the collating element. --- posix/regexec.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/posix/regexec.c b/posix/regexec.c index f877016..7f7ae31 100644 --- a/posix/regexec.c +++ b/posix/regexec.c @@ -4031,7 +4031,7 @@ find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) /* Skip the collation sequence value. */ idx += sizeof (uint32_t); /* Skip the wide char sequence of the collating element. */ - idx = idx + sizeof (uint32_t) * (extra[idx] + 1); + idx = idx + sizeof (uint32_t) * (*(int32_t *) (extra + idx) + 1); /* If we found the entry, return the sequence value. */ if (found) return *(uint32_t *) (extra + idx); -- 1.7.0.1 -- Andreas Schwab, schwab@redhat.com GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E "And now for something completely different." From schwab@redhat.com Wed May 5 16:04:00 2010 From: schwab@redhat.com (Andreas Schwab) Date: Wed, 05 May 2010 16:04:00 -0000 Subject: [PATCH] Fix name of tt_RU.UTF-8@iqtelif locale Message-ID: 2010-05-04 Andreas Schwab * SUPPORTED (SUPPORTED-LOCALES): Fix name of tt_RU.UTF-8@iqtelif locale. --- localedata/SUPPORTED | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/localedata/SUPPORTED b/localedata/SUPPORTED index a1ebcac..d665961 100644 --- a/localedata/SUPPORTED +++ b/localedata/SUPPORTED @@ -386,7 +386,7 @@ tr_TR.UTF-8/UTF-8 \ tr_TR/ISO-8859-9 \ ts_ZA/UTF-8 \ tt_RU.UTF-8/UTF-8 \ -tt_RU@iqtelif.UTF-8/UTF-8 \ +tt_RU.UTF-8@iqtelif/UTF-8 \ ug_CN/UTF-8 \ uk_UA.UTF-8/UTF-8 \ uk_UA/KOI8-U \ -- 1.7.0.1 -- Andreas Schwab, schwab@redhat.com GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E "And now for something completely different." From schwab@redhat.com Mon May 17 14:51:00 2010 From: schwab@redhat.com (Andreas Schwab) Date: Mon, 17 May 2010 14:51:00 -0000 Subject: [PATCH] Fix typo in es_CR locale Message-ID: 2010-05-17 Andreas Schwab * locales/es_CR (LC_ADDRESS): Fix character names in lang_ab. --- localedata/locales/es_CR | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/localedata/locales/es_CR b/localedata/locales/es_CR index 35a4b84..6cff560 100644 --- a/localedata/locales/es_CR +++ b/localedata/locales/es_CR @@ -157,7 +157,7 @@ country_post "" country_car "" country_isbn "9930,9977,9968" lang_name "" -lang_ab "<0065><0073>" +lang_ab "" lang_term "" country_ab2 "" country_ab3 "" -- 1.7.0.1 -- Andreas Schwab, schwab@redhat.com GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E "And now for something completely different." From schwab@redhat.com Wed May 19 15:04:00 2010 From: schwab@redhat.com (Andreas Schwab) Date: Wed, 19 May 2010 15:04:00 -0000 Subject: [PATCH] Don't crash on unresolved weak symbol reference Message-ID: 2010-05-19 Andreas Schwab * elf/dl-runtime.c (_dl_fixup): Don't crash on unresolved weak symbol reference. --- elf/dl-runtime.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c index a52120d..34b579f 100644 --- a/elf/dl-runtime.c +++ b/elf/dl-runtime.c @@ -144,7 +144,8 @@ _dl_fixup ( /* And now perhaps the relocation addend. */ value = elf_machine_plt_value (l, reloc, value); - if (__builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)) + if (__builtin_expect (sym + && ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)) value = ((DL_FIXUP_VALUE_TYPE (*) (void)) DL_FIXUP_VALUE_ADDR (value)) (); /* Finally, fix up the plt itself. */ -- 1.7.0.1 -- Andreas Schwab, schwab@redhat.com GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E "And now for something completely different." From schwab@redhat.com Thu May 20 12:19:00 2010 From: schwab@redhat.com (Andreas Schwab) Date: Thu, 20 May 2010 12:19:00 -0000 Subject: [PATCH] Make compatible with C++ Message-ID: 2010-05-20 Andreas Schwab * sysdeps/unix/sysv/linux/sys/timex.h: Use __REDIRECT_NTH. --- sysdeps/unix/sysv/linux/sys/timex.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/unix/sysv/linux/sys/timex.h b/sysdeps/unix/sysv/linux/sys/timex.h index e10311f..13b94d6 100644 --- a/sysdeps/unix/sysv/linux/sys/timex.h +++ b/sysdeps/unix/sysv/linux/sys/timex.h @@ -140,9 +140,9 @@ __BEGIN_DECLS extern int __adjtimex (struct timex *__ntx) __THROW; extern int adjtimex (struct timex *__ntx) __THROW; -#if defined __GNUC__ && __GNUC__ >= 2 -extern int ntp_gettime (struct ntptimeval *__ntv) - __asm__ ("ntp_gettimex") __THROW; +#ifdef __REDIRECT_NTH +extern int __REDIRECT_NTH (ntp_gettime, (struct ntptimeval *__ntv), + ntp_gettimex); #else extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW; # define ntp_gettime ntp_gettimex -- 1.7.0.1 -- Andreas Schwab, schwab@redhat.com GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E "And now for something completely different." From schwab@redhat.com Fri May 21 14:00:00 2010 From: schwab@redhat.com (Andreas Schwab) Date: Fri, 21 May 2010 14:00:00 -0000 Subject: [PATCH] sunrpc: Fix spurious fall-through Message-ID: 2010-05-21 Andreas Schwab * sunrpc/clnt_tcp.c (clnttcp_control): Add missing break. * sunrpc/clnt_udp.c (clntudp_control): Likewise. * sunrpc/clnt_unix.c (clntunix_control): Likewise. --- sunrpc/clnt_tcp.c | 1 + sunrpc/clnt_udp.c | 1 + sunrpc/clnt_unix.c | 1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git a/sunrpc/clnt_tcp.c b/sunrpc/clnt_tcp.c index 1552be8..d26a126 100644 --- a/sunrpc/clnt_tcp.c +++ b/sunrpc/clnt_tcp.c @@ -399,6 +399,7 @@ clnttcp_control (CLIENT *cl, int request, char *info) /* This will set the xid of the NEXT call */ *(u_long *)ct->ct_mcall = htonl (*(u_long *)info - 1); /* decrement by 1 as clnttcp_call() increments once */ + break; case CLGET_VERS: /* * This RELIES on the information that, in the call body, diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c index 62ee3a1..360e26a 100644 --- a/sunrpc/clnt_udp.c +++ b/sunrpc/clnt_udp.c @@ -582,6 +582,7 @@ clntudp_control (CLIENT *cl, int request, char *info) /* This will set the xid of the NEXT call */ *(u_long *)cu->cu_outbuf = htonl(*(u_long *)info - 1); /* decrement by 1 as clntudp_call() increments once */ + break; case CLGET_VERS: /* * This RELIES on the information that, in the call body, diff --git a/sunrpc/clnt_unix.c b/sunrpc/clnt_unix.c index db3ea31..bca1273 100644 --- a/sunrpc/clnt_unix.c +++ b/sunrpc/clnt_unix.c @@ -376,6 +376,7 @@ clntunix_control (CLIENT *cl, int request, char *info) /* This will set the xid of the NEXT call */ *(u_long *) ct->ct_mcall = htonl (*(u_long *)info - 1); /* decrement by 1 as clntunix_call() increments once */ + break; case CLGET_VERS: /* * This RELIES on the information that, in the call body, -- 1.7.0.1 -- Andreas Schwab, schwab@redhat.com GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E "And now for something completely different." From schwab@redhat.com Fri May 21 16:04:00 2010 From: schwab@redhat.com (Andreas Schwab) Date: Fri, 21 May 2010 16:04:00 -0000 Subject: [PATCH] Implement recvmmsg also as socketcall Message-ID: 2010-05-21 Andreas Schwab * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add recvmmsg and internal_recvmmsg. * sysdeps/unix/sysv/linux/recvmmsg.c: New file. * sysdeps/unix/sysv/linux/internal_recvmmsg.S: New file. * sysdeps/unix/sysv/linux/socketcall.h (SOCKOP_recvmmsg): Define. * sysdeps/unix/sysv/linux/syscalls.list (recvmmsg): Remove. --- sysdeps/unix/sysv/linux/Makefile | 2 +- sysdeps/unix/sysv/linux/internal_recvmmsg.S | 14 ++++ sysdeps/unix/sysv/linux/kernel-features.h | 5 ++ sysdeps/unix/sysv/linux/recvmmsg.c | 100 +++++++++++++++++++++++++++ sysdeps/unix/sysv/linux/socketcall.h | 1 + sysdeps/unix/sysv/linux/syscalls.list | 1 - 6 files changed, 121 insertions(+), 2 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/internal_recvmmsg.S create mode 100644 sysdeps/unix/sysv/linux/recvmmsg.c diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index 91c123b..9c53b2d 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -12,7 +12,7 @@ CFLAGS-malloc.c += -DMORECORE_CLEARS=2 endif ifeq ($(subdir),socket) -sysdep_routines += internal_accept4 +sysdep_routines += internal_accept4 recvmmsg internal_recvmmsg endif ifeq ($(subdir),misc) diff --git a/sysdeps/unix/sysv/linux/internal_recvmmsg.S b/sysdeps/unix/sysv/linux/internal_recvmmsg.S new file mode 100644 index 0000000..66c1357 --- /dev/null +++ b/sysdeps/unix/sysv/linux/internal_recvmmsg.S @@ -0,0 +1,14 @@ +#include +#include +#if !defined __NR_recvmmsg && defined __NR_socketcall +# define socket recvmmsg +# ifdef __ASSUME_RECVMMSG +# define __socket recvmmsg +# else +# define __socket __internal_recvmmsg +# endif +# define NARGS 5 +# define NEED_CANCELLATION +# define NO_WEAK_ALIAS +# include +#endif diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index 43783c1..b3f2456 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -525,3 +525,8 @@ #if __LINUX_KERNEL_VERSION >= 0x020620 # define __ASSUME_F_GETOWN_EX 1 #endif + +/* Support for the recvmmsg syscall was added in 2.6.33. */ +#if __LINUX_KERNEL_VERSION >= 0x020621 +# define __ASSUME_RECVMMSG 1 +#endif diff --git a/sysdeps/unix/sysv/linux/recvmmsg.c b/sysdeps/unix/sysv/linux/recvmmsg.c new file mode 100644 index 0000000..0c08171 --- /dev/null +++ b/sysdeps/unix/sysv/linux/recvmmsg.c @@ -0,0 +1,100 @@ +/* Copyright (C) 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Schwab , 2010. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include + +#include +#include +#include + + +#ifdef __NR_recvmmsg +int +recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags, + const struct timespec *tmo) +{ + if (SINGLE_THREAD_P) + return INLINE_SYSCALL (recvmmsg, 5, fd, vmessages, vlen, flags, tmo); + + int oldtype = LIBC_CANCEL_ASYNC (); + + int result = INLINE_SYSCALL (recvmmsg, 5, fd, vmessages, vlen, flags, tmo); + + LIBC_CANCEL_RESET (oldtype); + + return result; +} +#elif defined __NR_socketcall +# ifndef __ASSUME_RECVMMSG +extern int __internal_recvmmsg (int fd, struct mmsghdr *vmessages, + unsigned int vlen, int flags, + const struct timespec *tmo) + attribute_hidden; + +static int have_recvmmsg; + +int +recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags, + const struct timespec *tmo) +{ + if (__builtin_expect (have_recvmmsg >= 0, 1)) + { + int ret = __internal_recvmmsg (fd, vmessages, vlen, flags, tmo); + /* The kernel returns -EINVAL for unknown socket operations. + We need to convert that error to an ENOSYS error. */ + if (__builtin_expect (ret < 0, 0) + && have_recvmmsg == 0 + && errno == EINVAL) + { + /* Try another call, this time with an invalid file + descriptor and all other parameters cleared. This call + will not cause any harm and it will return + immediately. */ + ret = __internal_recvmmsg (-1, 0, 0, 0, 0); + if (errno == EINVAL) + { + have_recvmmsg = -1; + __set_errno (ENOSYS); + } + else + { + have_recvmmsg = 1; + __set_errno (EINVAL); + } + return -1; + } + return ret; + } + __set_errno (ENOSYS); + return -1; +} +# else +/* When __ASSUME_RECVMMSG recvmmsg is defined in internal_recvmmsg.S. */ +# endif +#else +int +recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags, + const struct timespec *tmo) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (recvmmsg) +#endif diff --git a/sysdeps/unix/sysv/linux/socketcall.h b/sysdeps/unix/sysv/linux/socketcall.h index adf01b6..bab4e4a 100644 --- a/sysdeps/unix/sysv/linux/socketcall.h +++ b/sysdeps/unix/sysv/linux/socketcall.h @@ -44,5 +44,6 @@ #define SOCKOP_sendmsg 16 #define SOCKOP_recvmsg 17 #define SOCKOP_accept4 18 +#define SOCKOP_recvmmsg 19 #endif /* sys/socketcall.h */ diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index a1a449e..a87906a 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -53,7 +53,6 @@ prctl EXTRA prctl i:iiiii __prctl prctl putpmsg - putpmsg i:ippii putpmsg query_module EXTRA query_module i:sipip query_module quotactl EXTRA quotactl i:isip quotactl -recvmmsg EXTRA recvmmsg Ci:ipiip recvmmsg remap_file_pages - remap_file_pages i:piiii __remap_file_pages remap_file_pages sched_getp - sched_getparam i:ip __sched_getparam sched_getparam sched_gets - sched_getscheduler i:i __sched_getscheduler sched_getscheduler -- 1.7.0.1 -- Andreas Schwab, schwab@redhat.com GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E "And now for something completely different." From schwab@redhat.com Wed May 26 17:07:00 2010 From: schwab@redhat.com (Andreas Schwab) Date: Wed, 26 May 2010 17:07:00 -0000 Subject: [PATCH] Fix scope handling during dl_close Message-ID: This fixes redhat bug 593675. Andreas. 2010-05-26 Andreas Schwab * elf/Makefile: Add rules to build and run unload8 test. * elf/unload8.c: New file. * elf/unload8mod1.c: New file. * elf/unload8mod1x.c: New file. * elf/unload8mod2.c: New file. * elf/unload8mod3.c: New file. * elf/dl-close.c (_dl_close_worker): Reset private search list if it wasn't used. --- elf/Makefile | 10 +++++++++- elf/dl-close.c | 7 +++++++ elf/unload8.c | 33 +++++++++++++++++++++++++++++++++ elf/unload8mod1.c | 7 +++++++ elf/unload8mod1x.c | 1 + elf/unload8mod2.c | 7 +++++++ elf/unload8mod3.c | 27 +++++++++++++++++++++++++++ 7 files changed, 91 insertions(+), 1 deletions(-) create mode 100644 elf/unload8.c create mode 100644 elf/unload8mod1.c create mode 100644 elf/unload8mod1x.c create mode 100644 elf/unload8mod2.c create mode 100644 elf/unload8mod3.c diff --git a/elf/Makefile b/elf/Makefile index c1bf974..046108e 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -89,6 +89,7 @@ distribute := rtld-Rules \ unload4mod1.c unload4mod2.c unload4mod3.c unload4mod4.c \ unload6mod1.c unload6mod2.c unload6mod3.c \ unload7mod1.c unload7mod2.c \ + unload8mod1.c unload8mod1x.c unload8mod2.c unload8mod3.c \ tst-audit1.c tst-audit2.c tst-audit3.c tst-audit4.c \ tst-auditmod1.c tst-auditmod3a.c tst-auditmod3b.c \ tst-auditmod4a.c tst-auditmod4b.c \ @@ -196,7 +197,7 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \ tst-align tst-align2 $(tests-execstack-$(have-z-execstack)) \ tst-dlmodcount tst-dlopenrpath tst-deep1 \ tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \ - unload3 unload4 unload5 unload6 unload7 tst-global1 order2 \ + unload3 unload4 unload5 unload6 unload7 unload8 tst-global1 order2 \ tst-audit1 tst-audit2 \ tst-stackguard1 tst-addr1 tst-thrlock \ tst-unique1 tst-unique2 @@ -249,6 +250,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \ unload4mod1 unload4mod2 unload4mod3 unload4mod4 \ unload6mod1 unload6mod2 unload6mod3 \ unload7mod1 unload7mod2 \ + unload8mod1 unload8mod1x unload8mod2 unload8mod3 \ order2mod1 order2mod2 order2mod3 order2mod4 \ tst-unique1mod1 tst-unique1mod2 \ tst-unique2mod1 tst-unique2mod2 @@ -524,6 +526,9 @@ $(objpfx)unload6mod2.so: $(libdl) $(objpfx)unload6mod3.so: $(libdl) $(objpfx)unload7mod1.so: $(libdl) $(objpfx)unload7mod2.so: $(objpfx)unload7mod1.so +$(objpfx)unload8mod1.so: $(objpfx)unload8mod2.so +$(objpfx)unload8mod2.so: $(objpfx)unload8mod3.so +$(objpfx)unload8mod3.so: $(libdl) LDFLAGS-tst-tlsmod5.so = -nostdlib LDFLAGS-tst-tlsmod6.so = -nostdlib @@ -825,6 +830,9 @@ $(objpfx)unload7: $(libdl) $(objpfx)unload7.out: $(objpfx)unload7mod1.so $(objpfx)unload7mod2.so unload7-ENV = MALLOC_PERTURB_=85 +$(objpfx)unload8: $(libdl) +$(objpfx)unload8.out: $(objpfx)unload8mod1.so $(objpfx)unload8mod1x.so + ifdef libdl $(objpfx)tst-tls9-static: $(common-objpfx)dlfcn/libdl.a $(objpfx)tst-tls9-static.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so diff --git a/elf/dl-close.c b/elf/dl-close.c index 700e765..f47d5f8 100644 --- a/elf/dl-close.c +++ b/elf/dl-close.c @@ -421,6 +421,13 @@ _dl_close_worker (struct link_map *map) imap->l_scope_max = new_size; } + else if (new_list != NULL) + { + /* We didn't change the scope array, so reset the search + list. */ + imap->l_searchlist.r_list = NULL; + imap->l_searchlist.r_nlist = 0; + } /* The loader is gone, so mark the object as not having one. Note: l_idx != IDX_STILL_USED -> object will be removed. */ diff --git a/elf/unload8.c b/elf/unload8.c new file mode 100644 index 0000000..f984a38 --- /dev/null +++ b/elf/unload8.c @@ -0,0 +1,33 @@ +#include +#include + +int +main (void) +{ + void *h = dlopen ("$ORIGIN/unload8mod1.so", RTLD_LAZY); + if (h == NULL) + { + puts ("dlopen unload8mod1.so failed"); + return 1; + } + + void *h2 = dlopen ("$ORIGIN/unload8mod1x.so", RTLD_LAZY); + if (h2 == NULL) + { + puts ("dlopen unload8mod1x.so failed"); + return 1; + } + dlclose (h2); + + int (*mod1) (void) = dlsym (h, "mod1"); + if (mod1 == NULL) + { + puts ("dlsym failed"); + return 1; + } + + mod1 (); + dlclose (h); + + return 0; +} diff --git a/elf/unload8mod1.c b/elf/unload8mod1.c new file mode 100644 index 0000000..fe7e81c --- /dev/null +++ b/elf/unload8mod1.c @@ -0,0 +1,7 @@ +extern void mod2 (void); + +void +mod1 (void) +{ + mod2 (); +} diff --git a/elf/unload8mod1x.c b/elf/unload8mod1x.c new file mode 100644 index 0000000..835b634 --- /dev/null +++ b/elf/unload8mod1x.c @@ -0,0 +1 @@ +int mod1x; diff --git a/elf/unload8mod2.c b/elf/unload8mod2.c new file mode 100644 index 0000000..2fd8b67 --- /dev/null +++ b/elf/unload8mod2.c @@ -0,0 +1,7 @@ +extern void mod3 (void); + +void +mod2 (void) +{ + mod3 (); +} diff --git a/elf/unload8mod3.c b/elf/unload8mod3.c new file mode 100644 index 0000000..d49e22b --- /dev/null +++ b/elf/unload8mod3.c @@ -0,0 +1,27 @@ +#include +#include +#include + +void +mod3_fini2 (void) +{ +} + +void +mod3_fini (void) +{ + mod3_fini2 (); +} + +void +mod3 (void) +{ + void *h = dlopen ("$ORIGIN/unload8mod2.so", RTLD_LAZY); + if (h == NULL) + { + puts ("dlopen unload8mod2.so failed"); + exit (1); + } + + atexit (mod3_fini); +} -- 1.7.1 -- Andreas Schwab, schwab@redhat.com GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E "And now for something completely different."