summaryrefslogtreecommitdiff
path: root/patches/glibc/linuxthreads-2.3.2/alpha_cfi1.patch
blob: e9532c7547d623802527c661a4fc636630a87a71 (plain)
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
Retrieved with
$ wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S.diff?r1=1.5&r2=1.6&cvsroot=glibc'
$ wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h.diff?r1=1.3&r2=1.4&cvsroot=glibc'

Might fix problem building with binutils-2.14.90.0.8/gcc-3.3.3 that was not
present with binutils-2.13.90.0.18/gcc-3.3.2:

../linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S: Assembler messages:
../linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S:63: Warning: .ent
directive without matching .end
../linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S:63: Error: can't resolve
`0' {.text section} - `L0^A' {.text section}
make[2]: ***
[/home/dkegel/wk/crosstool-0.26-pre3/build/alpha-unknown-linux-gnu/gcc-3.3-20040112-glibc-2.3.2/build-glibc/posix/vfork.o]
Error 1
make[2]: Leaving directory
`/home/dkegel/wk/crosstool-0.26-pre3/build/alpha-unknown-linux-gnu/gcc-3.3-20040112-glibc-2.3.2/glibc-2.3.2/posix'
make[1]: *** [posix/subdir_lib] Error 2
make[1]: Leaving directory
`/home/dkegel/wk/crosstool-0.26-pre3/build/alpha-unknown-linux-gnu/gcc-3.3-20040112-glibc-2.3.2/glibc-2.3.2'
make: *** [all] Error 2

See also alpha_cfi2.patch

===================================================================
RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S	2003/02/11 06:27:53	1.5
+++ libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S	2003/06/06 05:51:03	1.6
@@ -19,12 +19,13 @@
 
 #include <sysdep-cancel.h>
 
-	.globl __vfork
         .align 4
-        .ent __vfork,0
-__LABEL(__vfork)
+	.globl	__vfork
+	.type	__vfork, @function
+	.usepv	__vfork, std
+	cfi_startproc
+__vfork:
 	ldgp	gp, 0(pv)
-	.prologue 1
 	PSEUDO_PROF
 
 #ifdef SHARED
@@ -46,18 +47,24 @@
 	   fork and vfork object files.  */
 $do_fork:
 	subq	sp, 16, sp
+	cfi_adjust_cfa_offset(16)
 	stq	ra, 0(sp)
+	cfi_offset(ra, -16)
 	jsr	ra, HIDDEN_JUMPTARGET (__fork)
 	ldgp	gp, 0(ra)
 	ldq	ra, 0(sp)
 	addq	sp, 16, sp
+	cfi_restore(ra)
+	cfi_adjust_cfa_offset(-16)
 	ret
 
 $syscall_error:
 	SYSCALL_ERROR_HANDLER
 #endif
 
-PSEUDO_END(__vfork)
+	cfi_endproc
+	.size __vfork, .-__vfork
+
 libc_hidden_def (__vfork)
 
 weak_alias (__vfork, vfork)
===================================================================
RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h	2003/01/12 19:26:41	1.3
+++ libc/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h	2003/06/06 05:51:03	1.4
@@ -40,10 +40,11 @@
 # define PSEUDO(name, syscall_name, args)			\
 	.globl name;						\
 	.align 4;						\
-	.ent name, 0;						\
+	.type name, @function;					\
+	.usepv name, std;					\
+	cfi_startproc;						\
 __LABEL(name)							\
 	ldgp	gp, 0(pv);					\
-	.prologue 1;						\
 	PSEUDO_PROF;						\
 	PSEUDO_PREPARE_ARGS					\
 	SINGLE_THREAD_P(t0);					\
@@ -55,7 +56,9 @@
 	.subsection 2;						\
 __LABEL($pseudo_cancel)						\
 	subq	sp, 64, sp;					\
+	cfi_def_cfa_offset(64);					\
 	stq	ra, 0(sp);					\
+	cfi_offset(ra, -64);					\
 	SAVE_ARGS_##args;					\
 	CENABLE;						\
 	LOAD_ARGS_##args;					\
@@ -67,19 +70,27 @@
 	ldq	ra, 0(sp);					\
 	ldq	v0, 8(sp);					\
 	addq	sp, 64, sp;					\
+	cfi_remember_state;					\
+	cfi_restore(ra);					\
+	cfi_def_cfa_offset(0);					\
 	ret;							\
+	cfi_restore_state;					\
 __LABEL($multi_error)						\
 	CDISABLE;						\
 	ldq	ra, 0(sp);					\
 	ldq	v0, 8(sp);					\
 	addq	sp, 64, sp;					\
+	cfi_restore(ra);					\
+	cfi_def_cfa_offset(0);					\
 __LABEL($syscall_error)						\
 	SYSCALL_ERROR_HANDLER;					\
-	END(name);						\
 	.previous
 
 # undef PSEUDO_END
-# define PSEUDO_END(sym)
+# define PSEUDO_END(sym)					\
+	.subsection 2;						\
+	cfi_endproc;						\
+	.size sym, .-sym
 
 # define SAVE_ARGS_0	/* Nothing.  */
 # define SAVE_ARGS_1	SAVE_ARGS_0; stq a0, 8(sp)