[PATCH] Don't treat tls_offset == 1 as forced dynamic
Andreas Schwab
schwab@suse.de
Tue Dec 4 09:49:00 GMT 2012
A TLS offset of 1 is a valid one, so it cannot be used as a marker to
force dynamic tls block allocation. A valid tls_offset is never
negative, so use -1 as the marker instead.
Andreas.
[BZ #14898]
* include/link.h (FORCED_DYNAMIC_TLS_OFFSET) [NO_TLS_OFFSET == 0]:
Change to -1.
diff --git a/include/link.h b/include/link.h
index f0c8ad5..d759064 100644
--- a/include/link.h
+++ b/include/link.h
@@ -289,7 +289,7 @@ struct link_map
#endif
#ifndef FORCED_DYNAMIC_TLS_OFFSET
# if NO_TLS_OFFSET == 0
-# define FORCED_DYNAMIC_TLS_OFFSET 1
+# define FORCED_DYNAMIC_TLS_OFFSET -1
# elif NO_TLS_OFFSET == -1
# define FORCED_DYNAMIC_TLS_OFFSET -2
# else
--
1.8.0.1
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
More information about the Libc-alpha
mailing list