Error linking gdb statically

Peter S. Mazinger ps.m at gmx.net
Fri May 26 07:58:58 UTC 2006


On Thu, 25 May 2006, Qunying Pan wrote:

> 
> 
> >> >I would like to report something similar to what was reported for 
> >> >binutils here:
> >> >http://www.uclibc.org/lists/uclibc/2005-December/013558.html
> >> 
> >> 
> >> Making strncmp a weak hidden could fix the issue as the patch attached.
> >> Verified on arm, and mips. Is it acceptable? Please advice. Thanks!
> 
> >you have to keep them after the function 
> > (libc_hidden_proto is always before the function, libc_hidden_def or 
> >_weak after). Some gcc versions won't allow that.
> 
> 
> Thanks for pointing that out. My compiler was happy so I had missed. Here is
> the updated one. Acceptable? Thanks!

That is OK, but we are back to a discussion using weak or strong aliases 
over the place. The only one who voted at that time was Joakim Tjernlund 
(strong aliases used) no other developer here ever said something about it

I have changed the strong aliases policy to strong unless libpthread has 
the same functions, in that case strong in libpthread and weak in libc 
(it avoids link failure, but does not have any priority in usage strong 
over weak)

I would fix gdb to recognize strncmp being provided

Peter
> > Best Regards,
> 
> 
> 
> Qunying Pan <qpan at mvista.com>
> 
> 
> diff -urNp uClibc-20060518/libc.orig/string/arm/strncmp.S
> uClibc-20060518/libc/string/arm/strncmp.S
> --- uClibc-20060518/libc.orig/string/arm/strncmp.S	2006-04-11
> 17:05:18.000000000 -0700
> +++ uClibc-20060518/libc/string/arm/strncmp.S	2006-05-25
> 15:06:58.000000000 -0700
> @@ -65,4 +65,4 @@ strncmp:
>  
>  .size strncmp,.-strncmp
>  
> -libc_hidden_def(strncmp)
> +libc_hidden_weak(strncmp)
> diff -urNp uClibc-20060518/libc.orig/string/generic/strncmp.c
> uClibc-20060518/libc/string/generic/strncmp.c
> --- uClibc-20060518/libc.orig/string/generic/strncmp.c	2006-04-11
> 17:05:18.000000000 -0700
> +++ uClibc-20060518/libc/string/generic/strncmp.c	2006-05-25
> 15:07:26.000000000 -0700
> @@ -65,4 +65,4 @@ int strncmp (const char *s1, const char 
>  
>    return c1 - c2;
>  }
> -libc_hidden_def(strncmp)
> +libc_hidden_weak(strncmp)
> diff -urNp uClibc-20060518/libc.orig/string/i386/strncmp.c
> uClibc-20060518/libc/string/i386/strncmp.c
> --- uClibc-20060518/libc.orig/string/i386/strncmp.c	2006-04-11
> 17:05:18.000000000 -0700
> +++ uClibc-20060518/libc/string/i386/strncmp.c	2006-05-25
> 15:08:10.000000000 -0700
> @@ -55,4 +55,4 @@ int strncmp(const char *cs, const char *
>  	    :"1" (cs),"2" (ct),"3" (count));
>      return __res;
>  }
> -libc_hidden_def(strncmp)
> +libc_hidden_weak(strncmp)
> diff -urNp uClibc-20060518/libc.orig/string/ia64/strncmp.S
> uClibc-20060518/libc/string/ia64/strncmp.S
> --- uClibc-20060518/libc.orig/string/ia64/strncmp.S	2006-04-11
> 17:05:17.000000000 -0700
> +++ uClibc-20060518/libc/string/ia64/strncmp.S	2006-05-25
> 15:08:31.000000000 -0700
> @@ -59,4 +59,4 @@ ENTRY(strncmp)
>  .restore_and_exit:
>  	br.ret.sptk.many b0
>  END(strncmp)	
> -libc_hidden_def (strncmp)
> +libc_hidden_weak (strncmp)
> diff -urNp uClibc-20060518/libc.orig/string/strncmp.c
> uClibc-20060518/libc/string/strncmp.c
> --- uClibc-20060518/libc.orig/string/strncmp.c	2006-04-11
> 17:05:19.000000000 -0700
> +++ uClibc-20060518/libc/string/strncmp.c	2006-05-25
> 15:08:54.000000000 -0700
> @@ -38,5 +38,5 @@ int Wstrncmp(register const Wchar *s1, r
>  #endif
>  }
>  #ifndef WANT_WIDE
> -libc_hidden_def(strncmp)
> +libc_hidden_weak(strncmp)
>  #endif
> 
> 
> 
> 
> 
> 

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2




More information about the uClibc mailing list