Skip to content

Commit

Permalink
Only use USE___THREAD when defined
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Schwab committed Sep 13, 2011
1 parent 8682f8b commit 995a80d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2011-09-13 Andreas Schwab <schwab@redhat.com>

* elf/rtld.c (dl_main): Only use USE___THREAD when defined.
(init_tls): Likewise.

2011-09-12 Ulrich Drepper <drepper@gmail.com>

* sysdeps/ieee754/dbl-64/wordsize-64/s_logb.c: New file.
Expand Down
14 changes: 12 additions & 2 deletions elf/rtld.c
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,12 @@ cannot allocate TLS data structures for initial thread");

/* And finally install it for the main thread. If ld.so itself uses
TLS we know the thread pointer was initialized earlier. */
const char *lossage = TLS_INIT_TP (tcbp, USE___THREAD);
const char *lossage
#ifdef USE___THREAD
= TLS_INIT_TP (tcbp, USE___THREAD);
#else
= TLS_INIT_TP (tcbp, 0);
#endif
if (__builtin_expect (lossage != NULL, 0))
_dl_fatal_printf ("cannot set up thread-local storage: %s\n", lossage);
tls_init_tp_called = true;
Expand Down Expand Up @@ -2310,7 +2315,12 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
TLS we know the thread pointer was initialized earlier. */
if (! tls_init_tp_called)
{
const char *lossage = TLS_INIT_TP (tcbp, USE___THREAD);
const char *lossage
#ifdef USE___THREAD
= TLS_INIT_TP (tcbp, USE___THREAD);
#else
= TLS_INIT_TP (tcbp, 0);
#endif
if (__builtin_expect (lossage != NULL, 0))
_dl_fatal_printf ("cannot set up thread-local storage: %s\n",
lossage);
Expand Down

0 comments on commit 995a80d

Please sign in to comment.