On Tue, Mar 06, 2012 at 03:29:47AM +0000, Oleksandr Tymoshenko wrote:
> Author: gonzo
> Date: Tue Mar  6 03:29:46 2012
> New Revision: 232580
> URL: http://svn.freebsd.org/changeset/base/232580
> 
> Log:
>   - Remove NOSHARED parts since it seems to be no-op
>   - Call _init_tls for statically linked binaries
> 
> Modified:
>   head/lib/csu/mips/crt1.c
> 
> Modified: head/lib/csu/mips/crt1.c
> ==============================================================================
> --- head/lib/csu/mips/crt1.c  Tue Mar  6 03:27:58 2012        (r232579)
> +++ head/lib/csu/mips/crt1.c  Tue Mar  6 03:29:46 2012        (r232580)
> @@ -47,10 +47,8 @@ __FBSDID("$FreeBSD$");
>  struct Struct_Obj_Entry;
>  struct ps_strings;
>  
> -#ifndef NOSHARED
>  extern int _DYNAMIC;
>  #pragma weak _DYNAMIC
> -#endif
>  
>  extern void _init(void);
>  extern void _fini(void);
> @@ -91,10 +89,11 @@ __start(char **ap,
>                               __progname = s + 1;
>       }
>  
> -#ifndef NOSHARED
>       if (&_DYNAMIC != NULL)
>               atexit(cleanup);
> -#endif
> +     else
> +             _init_tls();
> +
>  #ifdef GCRT
>       atexit(_mcleanup);
>  #endif

Oh great. I tried to understand this bits for some time, due to init_array
work, and was unable to make any sense of it. I will update the patchset
to include MIPS now.

Attachment: pgp0XBOE8LBZx.pgp
Description: PGP signature

Reply via email to