From 3785d22822bc425cde879bea3c1758e71a30892a Mon Sep 17 00:00:00 2001 From: kmacy Date: Sun, 8 Oct 2006 02:50:34 +0000 Subject: Fix TLS on sparc64 for statically and dynamically linked binaries Approved by: rwatson (mentor) Reviewed by: jmg and marcel --- lib/csu/sparc64/crt1.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/csu/sparc64/crt1.c') diff --git a/lib/csu/sparc64/crt1.c b/lib/csu/sparc64/crt1.c index 19c0fad..5d8e371 100644 --- a/lib/csu/sparc64/crt1.c +++ b/lib/csu/sparc64/crt1.c @@ -98,13 +98,12 @@ _start(char **ap, void (*cleanup)(void), struct Struct_Obj_Entry *obj __unused, __progname = s + 1; } - __sparc_utrap_setup(); - if (&_DYNAMIC != NULL) atexit(cleanup); - else + else { + __sparc_utrap_setup(); _init_tls(); - + } #ifdef GCRT atexit(_mcleanup); #endif -- cgit v1.1