From 915a6c51c5d8127e87ef797ee23e04e4f92b4c4f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 19 Dec 2005 07:26:29 +0000 Subject: * iconv/gconv.c: Demangle pointers before use if necessary. * iconv/gconv_cache.c: Likewise. * iconv/skeleton.c: Likewise. * libio/iofwide.c: Likewise. * wcsmbs/btowc.c: Likewise. * wcsmbs/mbrtowc.c: Likewise. * wcsmbs/mbsnrtowcs.c: Likewise. * wcsmbs/mbsrtowcs_l.c: Likewise. * wcsmbs/wcrtomb.c: Likewise. * wcsmbs/wcsnrtombs.c: Likewise. * wcsmbs/wcsrtombs.c: Likewise. * wcsmbs/wctob.c: Likewise. * iconv_gconv_db.c: Likewise. After init functions returns mangle btowc pointer if necessary. * iconv/gconv_dl.c: Mangle function pointers retrieved from dlsym. --- iconv/gconv_dl.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'iconv/gconv_dl.c') diff --git a/iconv/gconv_dl.c b/iconv/gconv_dl.c index 9504017210..8217b7e553 100644 --- a/iconv/gconv_dl.c +++ b/iconv/gconv_dl.c @@ -1,5 +1,5 @@ /* Handle loading/unloading of shared object for transformation. - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004 + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -29,6 +29,7 @@ #include #include +#include #ifdef DEBUG @@ -130,6 +131,14 @@ __gconv_find_shlib (const char *name) found->init_fct = __libc_dlsym (found->handle, "gconv_init"); found->end_fct = __libc_dlsym (found->handle, "gconv_end"); +#ifdef PTR_MANGLE + PTR_MANGLE (found->fct); + if (found->init_fct != NULL) + PTR_MANGLE (found->init_fct); + if (found->end_fct != NULL) + PTR_MANGLE (found->end_fct); +#endif + /* We have succeeded in loading the shared object. */ found->counter = 1; } -- cgit v1.2.3