mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 00:10:10 +00:00
Update.
2003-04-12 Ulrich Drepper <drepper@redhat.com> * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug which mishandles loading of global object addresses in PIC. (THREAD_SETMEM_NC): Likewise.
This commit is contained in:
parent
68107ec092
commit
177d1ad3ac
@ -1 +1 @@
|
|||||||
NPTL 0.34 by Ulrich Drepper
|
NPTL 0.35 by Ulrich Drepper
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2003-04-12 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
|
||||||
|
which mishandles loading of global object addresses in PIC.
|
||||||
|
(THREAD_SETMEM_NC): Likewise.
|
||||||
|
|
||||||
2003-04-11 Ulrich Drepper <drepper@redhat.com>
|
2003-04-11 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* pthread.h: Define new data structure for cleanup buffer. Declare
|
* pthread.h: Define new data structure for cleanup buffer. Declare
|
||||||
|
@ -105,7 +105,7 @@
|
|||||||
cancellation state value is saved. */
|
cancellation state value is saved. */
|
||||||
# define EH_FRAME_0(name) \
|
# define EH_FRAME_0(name) \
|
||||||
.byte 4; \
|
.byte 4; \
|
||||||
.long L(PUSHSTATE)-name; \
|
.long L(PUSHSTATE)-L(name##START); \
|
||||||
.byte 14; \
|
.byte 14; \
|
||||||
.uleb128 8; \
|
.uleb128 8; \
|
||||||
.byte 4; \
|
.byte 4; \
|
||||||
@ -122,7 +122,7 @@
|
|||||||
also to save the content of the %ebx register. */
|
also to save the content of the %ebx register. */
|
||||||
# define EH_FRAME_3(name) \
|
# define EH_FRAME_3(name) \
|
||||||
.byte 4; \
|
.byte 4; \
|
||||||
.long L(PUSHBX1)-name; \
|
.long L(PUSHBX1)-L(name##START); \
|
||||||
.byte 14; \
|
.byte 14; \
|
||||||
.uleb128 8; \
|
.uleb128 8; \
|
||||||
.byte 4; \
|
.byte 4; \
|
||||||
@ -149,7 +149,7 @@
|
|||||||
/* With four parameters the syscall wrappers have to save %ebx and %esi. */
|
/* With four parameters the syscall wrappers have to save %ebx and %esi. */
|
||||||
# define EH_FRAME_4(name) \
|
# define EH_FRAME_4(name) \
|
||||||
.byte 4; \
|
.byte 4; \
|
||||||
.long L(PUSHSI1)-name; \
|
.long L(PUSHSI1)-L(name##START); \
|
||||||
.byte 14; \
|
.byte 14; \
|
||||||
.uleb128 8; \
|
.uleb128 8; \
|
||||||
.byte 4; \
|
.byte 4; \
|
||||||
@ -193,7 +193,7 @@
|
|||||||
and %edi. */
|
and %edi. */
|
||||||
# define EH_FRAME_5(name) \
|
# define EH_FRAME_5(name) \
|
||||||
.byte 4; \
|
.byte 4; \
|
||||||
.long L(PUSHDI1)-name; \
|
.long L(PUSHDI1)-L(name##START); \
|
||||||
.byte 14; \
|
.byte 14; \
|
||||||
.uleb128 8; \
|
.uleb128 8; \
|
||||||
.byte 4; \
|
.byte 4; \
|
||||||
|
@ -204,6 +204,15 @@ typedef struct
|
|||||||
__value; })
|
__value; })
|
||||||
|
|
||||||
|
|
||||||
|
/* Loading addresses of objects on x86-64 needs to be treated special
|
||||||
|
when generating PIC code. */
|
||||||
|
#ifdef __pic__
|
||||||
|
# define IMM_MODE "nr"
|
||||||
|
#else
|
||||||
|
# define IMM_MODE "ir"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Same as THREAD_SETMEM, but the member offset can be non-constant. */
|
/* Same as THREAD_SETMEM, but the member offset can be non-constant. */
|
||||||
# define THREAD_SETMEM(descr, member, value) \
|
# define THREAD_SETMEM(descr, member, value) \
|
||||||
({ if (sizeof (descr->member) == 1) \
|
({ if (sizeof (descr->member) == 1) \
|
||||||
@ -212,7 +221,7 @@ typedef struct
|
|||||||
"i" (offsetof (struct pthread, member))); \
|
"i" (offsetof (struct pthread, member))); \
|
||||||
else if (sizeof (descr->member) == 4) \
|
else if (sizeof (descr->member) == 4) \
|
||||||
asm volatile ("movl %0,%%fs:%P1" : \
|
asm volatile ("movl %0,%%fs:%P1" : \
|
||||||
: "ir" (value), \
|
: IMM_MODE (value), \
|
||||||
"i" (offsetof (struct pthread, member))); \
|
"i" (offsetof (struct pthread, member))); \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
@ -222,7 +231,7 @@ typedef struct
|
|||||||
abort (); \
|
abort (); \
|
||||||
\
|
\
|
||||||
asm volatile ("movq %q0,%%fs:%P1" : \
|
asm volatile ("movq %q0,%%fs:%P1" : \
|
||||||
: "ir" ((unsigned long int) value), \
|
: IMM_MODE ((unsigned long int) value), \
|
||||||
"i" (offsetof (struct pthread, member))); \
|
"i" (offsetof (struct pthread, member))); \
|
||||||
}})
|
}})
|
||||||
|
|
||||||
@ -236,7 +245,7 @@ typedef struct
|
|||||||
"r" (idx)); \
|
"r" (idx)); \
|
||||||
else if (sizeof (descr->member[0]) == 4) \
|
else if (sizeof (descr->member[0]) == 4) \
|
||||||
asm volatile ("movl %0,%%fs:%P1(,%q2,4)" : \
|
asm volatile ("movl %0,%%fs:%P1(,%q2,4)" : \
|
||||||
: "ir" (value), \
|
: IMM_MODE (value), \
|
||||||
"i" (offsetof (struct pthread, member[0])), \
|
"i" (offsetof (struct pthread, member[0])), \
|
||||||
"r" (idx)); \
|
"r" (idx)); \
|
||||||
else \
|
else \
|
||||||
@ -247,7 +256,7 @@ typedef struct
|
|||||||
abort (); \
|
abort (); \
|
||||||
\
|
\
|
||||||
asm volatile ("movq %q0,%%fs:%P1(,%q2,8)" : \
|
asm volatile ("movq %q0,%%fs:%P1(,%q2,8)" : \
|
||||||
: "r" ((unsigned long int) value), \
|
: IMM_MODE ((unsigned long int) value), \
|
||||||
"i" (offsetof (struct pthread, member[0])), \
|
"i" (offsetof (struct pthread, member[0])), \
|
||||||
"r" (idx)); \
|
"r" (idx)); \
|
||||||
}})
|
}})
|
||||||
|
@ -370,7 +370,7 @@ _dl_allocate_tls_init (void *result)
|
|||||||
assert (map->l_tls_modid == cnt);
|
assert (map->l_tls_modid == cnt);
|
||||||
assert (map->l_tls_blocksize >= map->l_tls_initimage_size);
|
assert (map->l_tls_blocksize >= map->l_tls_initimage_size);
|
||||||
# if TLS_TCB_AT_TP
|
# if TLS_TCB_AT_TP
|
||||||
assert (map->l_tls_offset >= map->l_tls_blocksize);
|
assert ((size_t) map->l_tls_offset >= map->l_tls_blocksize);
|
||||||
dest = (char *) result - map->l_tls_offset;
|
dest = (char *) result - map->l_tls_offset;
|
||||||
# elif TLS_DTV_AT_TP
|
# elif TLS_DTV_AT_TP
|
||||||
dest = (char *) result + map->l_tls_offset;
|
dest = (char *) result + map->l_tls_offset;
|
||||||
|
@ -289,3 +289,8 @@
|
|||||||
# define __ASSUME_NETLINK_SUPPORT 1
|
# define __ASSUME_NETLINK_SUPPORT 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* For x86, support for the sysenter instruction was available in
|
||||||
|
2.5.53. */
|
||||||
|
#if __LINUX_KERNEL_VERSION >= 132405 && defined __i386__
|
||||||
|
# define __ASSUME_VSYSCALL 1
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user