this is based on the http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=675063 patch from "aiht" . Index: libextractor-0.6.3/src/main/extractor.c =================================================================== --- libextractor-0.6.3.orig/src/main/extractor.c 2012-06-04 19:58:26.873816051 +0000 +++ libextractor-0.6.3/src/main/extractor.c 2012-06-06 07:30:30.001564926 +0000 @@ -524,7 +524,17 @@ if ( (NULL != (la = strstr (ent->d_name, ".la"))) && (la[3] == '\0') ) continue; /* only load '.so' and '.dll' */ - sym_name = strstr (ent->d_name, "_"); + sym_name = strchr (ent->d_name, '_'); +#if DEBUG >3 + fprintf (stderr, + "check dir_name `%s'\n", + ent->d_name); + + fprintf (stderr, + "check sym_name `%s'\n", + sym_name); +#endif + if (sym_name == NULL) continue; sym_name++; @@ -534,7 +544,7 @@ closedir (dir); return; } - dot = strstr (sym, "."); + dot = strchr (sym, '.'); if (dot != NULL) *dot = '\0'; if (0 == strcmp (sym, sc->short_name)) @@ -546,12 +556,20 @@ free (sym); } #if DEBUG - if (sc->path == NULL) + if (sc->path == NULL) { fprintf (stderr, "Failed to find plugin `%s' in `%s'\n", sc->short_name, path); -#endif + } + else { + fprintf (stderr, + "check plugin `%s' in `%s' %s\n", + sc->short_name, + path, + sc->path); + } + #endif closedir (dir); } @@ -613,7 +631,16 @@ (la[2] == '\0')) ) continue; /* only load '.so' and '.dll' */ - sym_name = strstr (ent->d_name, "_"); + sym_name = strchr (ent->d_name, '_'); +#if DEBUG >3 + fprintf (stderr, + "check dir_name1 `%s'\n", + ent->d_name); + + fprintf (stderr, + "check sym_name1 `%s'\n", + sym_name); +#endif if (sym_name == NULL) continue; sym_name++; @@ -623,7 +650,7 @@ closedir (dir); return; } - dot = strstr (sym, "."); + dot = strchr (sym, '.'); if (dot != NULL) *dot = '\0'; #if DEBUG > 1 @@ -683,6 +710,13 @@ const char *prefix, const char **options) { + +#if DEBUG >3 + fprintf(stderr,"get_symbol_with_prefix(template %s,prefix %s,)", + template, + prefix); +#endif + char *name; void *symbol; const char *sym_name; @@ -691,14 +725,14 @@ const char *(*opt_fun)(void); if (NULL != options) *options = NULL; - sym_name = strstr (prefix, "_"); + sym_name = strstr (prefix, "libextractor_")+12; if (sym_name == NULL) return NULL; sym_name++; sym = strdup (sym_name); if (sym == NULL) return NULL; - dot = strstr (sym, "."); + dot = strchr (sym, '.'); if (dot != NULL) *dot = '\0'; name = malloc(strlen(sym) + strlen(template) + 1);