[uclibc-nptl] missing dl_error_names string

Khem Raj kraj at mvista.com
Fri Mar 2 10:18:04 UTC 2007


of course it doesn't help if there is no comma at the end of the string
so here is the corrected patch.

Thanks

-Khem

Index: uclibc-0.9.29/ldso/libdl/libdl.c
===================================================================
--- uclibc-0.9.29.orig/ldso/libdl/libdl.c
+++ uclibc-0.9.29/ldso/libdl/libdl.c
@@ -138,6 +138,7 @@ static const char *dl_error_names[] = {
       "Not an ELF shared library",
       "Unable to mmap file",
       "No dynamic section",
+       "Library contains unsupported TLS",
#ifdef ELF_USES_RELOCA
       "Unable to process REL relocs",
#else




Khem Raj said the following on 3/2/2007 1:43 AM:
> Hi Steve
>
> nptl-branch is missing a dl_error_names entry corresponding to new 
> error code LD_ERROR_TLS_FAILED
> This causes attached program to segfault.
>
> Following patch fixes this issue on uclibc-nptl branch.
>
> Thanks
>
> -Khem
>
> Index: uclibc-0.9.29/ldso/libdl/libdl.c
> ===================================================================
> --- uclibc-0.9.29.orig/ldso/libdl/libdl.c
> +++ uclibc-0.9.29/ldso/libdl/libdl.c
> @@ -138,6 +138,7 @@ static const char *dl_error_names[] = {
>        "Not an ELF shared library",
>        "Unable to mmap file",
>        "No dynamic section",
> +       "Library contains unsupported TLS"
> #ifdef ELF_USES_RELOCA
>        "Unable to process REL relocs",
> #else
>
>
> ------------------------------------------------------------------------
>
> #include <stdio.h>
> #include <dlfcn.h>
>
>
> int main()
> {
>   void *handle;
>   void *p;
>   char *msg;
>
>   handle = dlopen("/usr/lib/libjpeg.so", RTLD_NOW);
>   if (!handle)
>   {
>      printf("fix test\n");
>      return 1;
>   }
>  
>   p = dlsym(handle, "nosymble");
>   if (!p)
>   { 
>     msg = dlerror();
>     if (msg)
>     {
>       /* fail here */ 
>       printf("%s\n", msg);
>     }
>   }
>   dlclose(handle);
>
>   return 0;
> }
>   
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://busybox.net/cgi-bin/mailman/listinfo/uclibc

-- 
Khem Raj <kraj at mvista.com>
MontaVista Software Inc.




More information about the uClibc mailing list