Skip to content

Commit b6c90cc

Browse files
committed
TSRM: use local-exec TLS in PIE executables
1 parent a7f40d1 commit b6c90cc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

TSRM/TSRM.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ TSRM_API bool tsrm_is_managed_thread(void);
155155
#if !__has_attribute(tls_model) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__MUSL__) || defined(__HAIKU__)
156156
# define TSRM_TLS_MODEL_ATTR
157157
# define TSRM_TLS_MODEL_DEFAULT
158-
#elif __PIC__
158+
#elif defined(__PIC__) && !defined(__PIE__)
159159
# define TSRM_TLS_MODEL_ATTR __attribute__((tls_model("initial-exec")))
160160
# define TSRM_TLS_MODEL_INITIAL_EXEC
161161
#else

0 commit comments

Comments
 (0)