source: patches/glibc-2.8-alpha_fixes-1.patch@ aaa4568

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since aaa4568 was 53ceaca, checked in by Joe Ciccone <jciccone@…>, 16 years ago

Add a patch to alpha that contains general glibc fixes.

  • Property mode set to 100644
File size: 7.0 KB
RevLine 
[53ceaca]1Submitted By: Joe Ciccone <jciccone@gmail.com>
2Date: 2008-10-12
3Initial Package Version: 2.8
4Upstream Status: Reported & No Status
5Origin: http://sources.redhat.com/bugzilla/show_bug.cgi?id=5216
6 http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.8/6015_all_alpha-glibc-2.5-no-page-header.patch?rev=1.1&view=log
7 http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.8/6016_all_alpha-glibc-2.5-no-asm-elf-header.patch?rev=1.1&view=log
8 http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.8/6017_all_alpha-glibc-2.8-creat.patch?rev=1.1&view=log
9 Joe Ciccone & http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/glibc/2.8/6018_all_alpha-glibc-2.8-cache-shape.patch?rev=1.1&view=log
10Description: Fixes various problems on alpha.
11
12diff -Naur glibc-2.8.orig/sysdeps/unix/alpha/sysdep.h glibc-2.8/sysdeps/unix/alpha/sysdep.h
13--- glibc-2.8.orig/sysdeps/unix/alpha/sysdep.h 2006-03-03 06:21:28.000000000 -0500
14+++ glibc-2.8/sysdeps/unix/alpha/sysdep.h 2008-10-12 12:31:17.000000000 -0400
15@@ -397,42 +397,4 @@
16 _sc_ret = _sc_0, _sc_err = _sc_19; \
17 }
18
19-/* Pointer mangling support. Note that tls access is slow enough that
20- we don't deoptimize things by placing the pointer check value there. */
21-
22-#include <stdint.h>
23-
24-#if defined NOT_IN_libc && defined IS_IN_rtld
25-# ifdef __ASSEMBLER__
26-# define PTR_MANGLE(dst, src, tmp) \
27- ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \
28- ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \
29- xor src, tmp, dst
30-# define PTR_MANGLE2(dst, src, tmp) \
31- xor src, tmp, dst
32-# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
33-# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
34-# else
35-extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
36-# define PTR_MANGLE(var) \
37- (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
38-# define PTR_DEMANGLE(var) PTR_MANGLE(var)
39-# endif
40-#elif defined PIC
41-# ifdef __ASSEMBLER__
42-# define PTR_MANGLE(dst, src, tmp) \
43- ldq tmp, __pointer_chk_guard; \
44- xor src, tmp, dst
45-# define PTR_MANGLE2(dst, src, tmp) \
46- xor src, tmp, dst
47-# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
48-# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
49-# else
50-extern uintptr_t __pointer_chk_guard attribute_relro;
51-# define PTR_MANGLE(var) \
52- (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
53-# define PTR_DEMANGLE(var) PTR_MANGLE(var)
54-# endif
55-#endif
56-
57 #endif /* ASSEMBLER */
58diff -Naur glibc-2.8.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.8/sysdeps/unix/sysv/linux/alpha/dl-support.c
59--- glibc-2.8.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c 2007-03-13 17:25:16.000000000 -0400
60+++ glibc-2.8/sysdeps/unix/sysv/linux/alpha/dl-support.c 2008-10-12 12:31:30.000000000 -0400
61@@ -1,2 +1 @@
62-#include "dl-auxv.h"
63 #include <elf/dl-support.c>
64diff -Naur glibc-2.8.orig/sysdeps/unix/sysv/linux/alpha/sys/procfs.h glibc-2.8/sysdeps/unix/sysv/linux/alpha/sys/procfs.h
65--- glibc-2.8.orig/sysdeps/unix/sysv/linux/alpha/sys/procfs.h 2001-07-06 00:56:13.000000000 -0400
66+++ glibc-2.8/sysdeps/unix/sysv/linux/alpha/sys/procfs.h 2008-10-12 12:31:17.000000000 -0400
67@@ -29,10 +29,23 @@
68 #include <sys/types.h>
69 #include <sys/ucontext.h>
70 #include <sys/user.h>
71-#include <asm/elf.h>
72
73 __BEGIN_DECLS
74
75+/*
76+ * The OSF/1 version of <sys/procfs.h> makes gregset_t 46 entries long.
77+ * I have no idea why that is so. For now, we just leave it at 33
78+ * (32 general regs + processor status word).
79+ */
80+#define ELF_NGREG 33
81+#define ELF_NFPREG 32
82+
83+typedef unsigned long elf_greg_t;
84+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
85+
86+typedef double elf_fpreg_t;
87+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
88+
89 struct elf_siginfo
90 {
91 int si_signo; /* Signal number. */
92diff -Naur glibc-2.8.orig/sysdeps/unix/sysv/linux/alpha/sys/user.h glibc-2.8/sysdeps/unix/sysv/linux/alpha/sys/user.h
93--- glibc-2.8.orig/sysdeps/unix/sysv/linux/alpha/sys/user.h 2001-07-06 00:56:13.000000000 -0400
94+++ glibc-2.8/sysdeps/unix/sysv/linux/alpha/sys/user.h 2008-10-12 12:31:17.000000000 -0400
95@@ -23,7 +23,6 @@
96 only. Don't read too much into it. Don't use it for anything other
97 than gdb/strace unless you know what you are doing. */
98
99-#include <asm/page.h>
100 #include <asm/reg.h>
101
102 struct user
103@@ -41,6 +40,9 @@
104 char u_comm[32]; /* user command name */
105 };
106
107+#define PAGE_SHIFT 13
108+#define PAGE_SIZE (1 << PAGE_SHIFT)
109+#define PAGE_MASK (~(PAGE_SIZE-1))
110 #define NBPG PAGE_SIZE
111 #define UPAGES 1
112 #define HOST_TEXT_START_ADDR (u.start_code)
113diff -Naur glibc-2.8.orig/sysdeps/unix/sysv/linux/alpha/sysdep.h glibc-2.8/sysdeps/unix/sysv/linux/alpha/sysdep.h
114--- glibc-2.8.orig/sysdeps/unix/sysv/linux/alpha/sysdep.h 2007-08-21 04:07:28.000000000 -0400
115+++ glibc-2.8/sysdeps/unix/sysv/linux/alpha/sysdep.h 2008-10-12 12:31:17.000000000 -0400
116@@ -98,4 +98,46 @@
117 INTERNAL_SYSCALL1(name, err_out, nr, args); \
118 })
119
120+/* Pointer mangling support. Note that tls access is slow enough that
121+ we don't deoptimize things by placing the pointer check value there. */
122+
123+#if defined NOT_IN_libc && defined IS_IN_rtld
124+# ifdef __ASSEMBLER__
125+# define PTR_MANGLE(dst, src, tmp) \
126+ ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \
127+ ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \
128+ xor src, tmp, dst
129+# define PTR_MANGLE2(dst, src, tmp) \
130+ xor src, tmp, dst
131+# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
132+# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
133+# else
134+extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
135+# define PTR_MANGLE(var) \
136+ (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
137+# define PTR_DEMANGLE(var) PTR_MANGLE(var)
138+# endif
139+#elif defined PIC
140+# ifdef __ASSEMBLER__
141+# define PTR_MANGLE(dst, src, tmp) \
142+ ldq tmp, __pointer_chk_guard; \
143+ xor src, tmp, dst
144+# define PTR_MANGLE2(dst, src, tmp) \
145+ xor src, tmp, dst
146+# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp)
147+# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp)
148+# else
149+extern uintptr_t __pointer_chk_guard attribute_relro;
150+# define PTR_MANGLE(var) \
151+ (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
152+# define PTR_DEMANGLE(var) PTR_MANGLE(var)
153+# endif
154+#else
155+/* Pointer mangling is not yet supported for static libc on alpha. */
156+# ifndef __ASSEMBLER__
157+# define PTR_MANGLE(var) (void) (var)
158+# define PTR_DEMANGLE(var) (void) (var)
159+# endif
160+#endif
161+
162 #endif /* _LINUX_ALPHA_SYSDEP_H */
163diff -Naur glibc-2.8.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.8/sysdeps/unix/sysv/linux/wordsize-64/creat64.c
164--- glibc-2.8.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 14:34:26.000000000 -0500
165+++ glibc-2.8/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2008-10-12 12:31:17.000000000 -0400
166@@ -1 +1,5 @@
167 /* Defined as alias for the syscall. */
168+#include <sysdep.h>
169+#ifndef __NR_creat
170+#include "../../../../../io/creat64.c"
171+#endif
Note: See TracBrowser for help on using the repository browser.