summaryrefslogtreecommitdiff
path: root/nptl_db
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2004-03-14 03:39:57 +0000
committerRoland McGrath <roland@gnu.org>2004-03-14 03:39:57 +0000
commit6964ccb2fea295bb7c30959146b0260c059f6a35 (patch)
treeae36dfbdf5e4a3b2b5b6b94c30c3737a7dfd548a /nptl_db
parentab0fcbfaaa5a6306ddb9a0abd2b945c160f99629 (diff)
downloadglibc-6964ccb2fea295bb7c30959146b0260c059f6a35.tar.gz
2004-03-13 Jakub Jelinek <jakub@redhat.com>
* db_info.c: Don't use TLS_TP_OFFSET in the #if, but TLS_TCB_SIZE == 0 ?: in the DESC macro.
Diffstat (limited to 'nptl_db')
-rw-r--r--nptl_db/db_info.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/nptl_db/db_info.c b/nptl_db/db_info.c
index 6ffe8bb058..5000b99ba5 100644
--- a/nptl_db/db_info.c
+++ b/nptl_db/db_info.c
@@ -53,19 +53,13 @@ typedef struct link_map link_map;
#if TLS_TCB_AT_TP
# define dtvp header.dtv
-#elif TLS_DTV_AT_TP && TLS_TP_OFFSET > 0
-/* Special case hack. Really this #if should be TLS_TCB_SIZE == 0, but
- when untrue it's a sizeof expression, and that wouldn't fly. In this
- flavor (PowerPC), there is no TCB containing the DTV at the TP, but
- actually the TCB lies behind the TP, i.e. at the very end of the area
- covered by TLS_PRE_TCB_SIZE. */
-DESC (_thread_db_pthread_dtvp,
- TLS_PRE_TCB_SIZE - sizeof (tcbhead_t) + offsetof (tcbhead_t, dtv),
- union dtv)
#elif TLS_DTV_AT_TP
-/* Special case hack. */
+/* Special case hack. If TLS_TCB_SIZE == 0 (on PowerPC), there is no TCB
+ containing the DTV at the TP, but actually the TCB lies behind the TP,
+ i.e. at the very end of the area covered by TLS_PRE_TCB_SIZE. */
DESC (_thread_db_pthread_dtvp,
- TLS_PRE_TCB_SIZE + offsetof (tcbhead_t, dtv), union dtv)
+ TLS_PRE_TCB_SIZE + offsetof (tcbhead_t, dtv)
+ - (TLS_TCB_SIZE == 0 ? sizeof (tcbhead_t) : 0), union dtv)
#endif