1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
From 1560d8c409c802ea06ecb921fcc5a534b70d32d7 Mon Sep 17 00:00:00 2001
From: William Pitcock <nenolod@dereferenced.org>
Date: Wed, 20 Oct 2010 09:48:33 -0500
Subject: [PATCH 2/2] libpthread: Fix compilation on x86_64.
---
.../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S | 2 +-
.../unix/sysv/linux/x86_64/lowlevelrobustlock.S | 2 +-
.../sysv/linux/x86_64/pthread_cond_timedwait.S | 10 +---------
.../sysv/linux/x86_64/pthread_rwlock_timedrdlock.S | 2 +-
.../sysv/linux/x86_64/pthread_rwlock_timedwrlock.S | 2 +-
.../sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S | 2 +-
6 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
index f875323..5f1d11e 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
@@ -163,7 +163,7 @@ __lll_timedlock_wait:
cfi_startproc
# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
# ifdef __PIC__
- cmpl $0, __have_futex_clock_realtime(%rip)
+ cmpl $0, __have_futex_clock_realtime@PLT
# else
cmpl $0, __have_futex_clock_realtime
# endif
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
index 2eb8e29..bfd9a14 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
@@ -118,7 +118,7 @@ __lll_robust_timedlock_wait:
cfi_startproc
# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
# ifdef __PIC__
- cmpl $0, __have_futex_clock_realtime(%rip)
+ cmpl $0, __have_futex_clock_realtime@PLT
# else
cmpl $0, __have_futex_clock_realtime
# endif
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
index 3a965ad..787298d 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
@@ -98,7 +98,7 @@ __pthread_cond_timedwait:
22:
#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
# ifdef __PIC__
- cmpl $0, __have_futex_clock_realtime(%rip)
+ cmpl $0, __have_futex_clock_realtime@PLT
# else
cmpl $0, __have_futex_clock_realtime
# endif
@@ -437,14 +437,6 @@ __pthread_cond_timedwait:
/* Only clocks 0 and 1 are allowed so far. Both are handled in the
kernel. */
leaq 32(%rsp), %rsi
-# ifdef SHARED
- movq __vdso_clock_gettime@GOTPCREL(%rip), %rax
- movq (%rax), %rax
- PTR_DEMANGLE (%rax)
- jz 26f
- call *%rax
- jmp 27f
-# endif
26: movl $__NR_clock_gettime, %eax
syscall
27:
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
index 3629ffb..5329ddd 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
@@ -96,7 +96,7 @@ pthread_rwlock_timedrdlock:
11:
#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
# ifdef __PIC__
- cmpl $0, __have_futex_clock_realtime(%rip)
+ cmpl $0, __have_futex_clock_realtime@PLT
# else
cmpl $0, __have_futex_clock_realtime
# endif
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
index 23e1ee1..e31c014 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
@@ -93,7 +93,7 @@ pthread_rwlock_timedwrlock:
11:
#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
# ifdef __PIC__
- cmpl $0, __have_futex_clock_realtime(%rip)
+ cmpl $0, __have_futex_clock_realtime@PLT
# else
cmpl $0, __have_futex_clock_realtime
# endif
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
index 704a222..7dfc788 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
@@ -61,7 +61,7 @@ sem_timedwait:
#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
# ifdef __PIC__
- cmpl $0, __have_futex_clock_realtime(%rip)
+ cmpl $0, __have_futex_clock_realtime@PLT
# else
cmpl $0, __have_futex_clock_realtime
# endif
--
1.7.2.1
|