1 diff -Nur linux-2.4.29/arch/mips/kernel/signal.c linux-2.4.29-gcc3.4/arch/mips/kernel/signal.c
2 --- linux-2.4.29/arch/mips/kernel/signal.c 2005-01-19 15:09:29.000000000 +0100
3 +++ linux-2.4.29-gcc3.4/arch/mips/kernel/signal.c 2005-03-27 23:09:57.000000000 +0200
5 * Copyright (C) 1991, 1992 Linus Torvalds
6 * Copyright (C) 1994 - 1999 Ralf Baechle
7 * Copyright (C) 1999 Silicon Graphics, Inc.
8 + * Copyright (C) 2004 Maciej W. Rozycki
10 #include <linux/config.h>
11 +#include <linux/compiler.h>
12 #include <linux/sched.h>
14 #include <linux/smp.h>
16 * Atomically swap in the new signal mask, and wait for a signal.
18 save_static_function(sys_sigsuspend);
19 -static_unused int _sys_sigsuspend(struct pt_regs regs)
20 +static int _sys_sigsuspend(struct pt_regs regs)
21 + __asm__("_sys_sigsuspend") __attribute_used__;
22 +static int _sys_sigsuspend(struct pt_regs regs)
24 sigset_t *uset, saveset, newset;
29 save_static_function(sys_rt_sigsuspend);
30 -static_unused int _sys_rt_sigsuspend(struct pt_regs regs)
31 +static int _sys_rt_sigsuspend(struct pt_regs regs)
32 + __asm__("_sys_rt_sigsuspend") __attribute_used__;
33 +static int _sys_rt_sigsuspend(struct pt_regs regs)
35 sigset_t *unewset, saveset, newset;
37 diff -Nur linux-2.4.29/arch/mips/kernel/syscall.c linux-2.4.29-gcc3.4/arch/mips/kernel/syscall.c
38 --- linux-2.4.29/arch/mips/kernel/syscall.c 2005-01-19 15:09:29.000000000 +0100
39 +++ linux-2.4.29-gcc3.4/arch/mips/kernel/syscall.c 2005-03-27 23:09:57.000000000 +0200
42 * Copyright (C) 1995 - 2000 by Ralf Baechle
43 * Copyright (C) 2000 Silicon Graphics, Inc.
44 + * Copyright (C) 2004 Maciej W. Rozycki
46 * TODO: Implement the compatibility syscalls.
47 * Don't waste that much memory for empty entries in the syscall
51 save_static_function(sys_fork);
52 -static_unused int _sys_fork(struct pt_regs regs)
53 +static int _sys_fork(struct pt_regs regs)
54 + __asm__("_sys_fork") __attribute_used__;
55 +static int _sys_fork(struct pt_regs regs)
62 save_static_function(sys_clone);
63 -static_unused int _sys_clone(struct pt_regs regs)
64 +static int _sys_clone(struct pt_regs regs)
65 + __asm__("_sys_clone") __attribute_used__;
66 +static int _sys_clone(struct pt_regs regs)
68 unsigned long clone_flags;
70 diff -Nur linux-2.4.29/arch/mips64/kernel/signal.c linux-2.4.29-gcc3.4/arch/mips64/kernel/signal.c
71 --- linux-2.4.29/arch/mips64/kernel/signal.c 2005-01-19 15:09:32.000000000 +0100
72 +++ linux-2.4.29-gcc3.4/arch/mips64/kernel/signal.c 2005-03-27 23:09:57.000000000 +0200
74 * Copyright (C) 1991, 1992 Linus Torvalds
75 * Copyright (C) 1994 - 2000 Ralf Baechle
76 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
77 + * Copyright (C) 2004 Maciej W. Rozycki
79 #include <linux/config.h>
80 +#include <linux/compiler.h>
81 #include <linux/sched.h>
83 #include <linux/smp.h>
85 * Atomically swap in the new signal mask, and wait for a signal.
87 save_static_function(sys_rt_sigsuspend);
88 -static_unused int _sys_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
89 +static int _sys_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
90 + __asm__("_sys_rt_sigsuspend") __attribute_used__;
91 +static int _sys_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
93 sigset_t *unewset, saveset, newset;
95 diff -Nur linux-2.4.29/arch/mips64/kernel/signal32.c linux-2.4.29-gcc3.4/arch/mips64/kernel/signal32.c
96 --- linux-2.4.29/arch/mips64/kernel/signal32.c 2005-01-19 15:09:33.000000000 +0100
97 +++ linux-2.4.29-gcc3.4/arch/mips64/kernel/signal32.c 2005-03-27 23:09:57.000000000 +0200
99 * Copyright (C) 1991, 1992 Linus Torvalds
100 * Copyright (C) 1994 - 2000 Ralf Baechle
101 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
102 + * Copyright (C) 2004 Maciej W. Rozycki
104 +#include <linux/compiler.h>
105 #include <linux/sched.h>
106 #include <linux/mm.h>
107 #include <linux/smp.h>
109 * Atomically swap in the new signal mask, and wait for a signal.
111 save_static_function(sys32_sigsuspend);
112 -static_unused int _sys32_sigsuspend(abi64_no_regargs, struct pt_regs regs)
113 +static int _sys32_sigsuspend(abi64_no_regargs, struct pt_regs regs)
114 + __asm__("_sys32_sigsuspend") __attribute_used__;
115 +static int _sys32_sigsuspend(abi64_no_regargs, struct pt_regs regs)
118 sigset_t newset, saveset;
122 save_static_function(sys32_rt_sigsuspend);
123 -static_unused int _sys32_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
124 +static int _sys32_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
125 + __asm__("_sys32_rt_sigsuspend") __attribute_used__;
126 +static int _sys32_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
129 sigset_t newset, saveset;
130 diff -Nur linux-2.4.29/arch/mips64/kernel/syscall.c linux-2.4.29-gcc3.4/arch/mips64/kernel/syscall.c
131 --- linux-2.4.29/arch/mips64/kernel/syscall.c 2005-01-19 15:09:33.000000000 +0100
132 +++ linux-2.4.29-gcc3.4/arch/mips64/kernel/syscall.c 2005-03-27 23:09:57.000000000 +0200
134 * Copyright (C) 1995 - 2000, 2001 by Ralf Baechle
135 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
136 * Copyright (C) 2001 MIPS Technologies, Inc.
137 + * Copyright (C) 2004 Maciej W. Rozycki
139 +#include <linux/compiler.h>
140 #include <linux/errno.h>
141 #include <linux/linkage.h>
142 #include <linux/mm.h>
146 save_static_function(sys_fork);
147 -static_unused int _sys_fork(abi64_no_regargs, struct pt_regs regs)
148 +static int _sys_fork(abi64_no_regargs, struct pt_regs regs)
149 + __asm__("_sys_fork") __attribute_used__;
150 +static int _sys_fork(abi64_no_regargs, struct pt_regs regs)
157 save_static_function(sys_clone);
158 -static_unused int _sys_clone(abi64_no_regargs, struct pt_regs regs)
159 +static int _sys_clone(abi64_no_regargs, struct pt_regs regs)
160 + __asm__("_sys_clone") __attribute_used__;
161 +static int _sys_clone(abi64_no_regargs, struct pt_regs regs)
163 unsigned long clone_flags;
165 diff -Nur linux-2.4.29/include/asm-mips/ptrace.h linux-2.4.29-gcc3.4/include/asm-mips/ptrace.h
166 --- linux-2.4.29/include/asm-mips/ptrace.h 2004-02-18 14:36:32.000000000 +0100
167 +++ linux-2.4.29-gcc3.4/include/asm-mips/ptrace.h 2005-03-27 23:09:57.000000000 +0200
171 * Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 by Ralf Baechle
172 + * Copyright (C) 2004 Maciej W. Rozycki
174 * Machine dependent structs and defines to help the user use
175 * the ptrace system call.
177 "sw\t$22,"__str(PT_R22)"($29)\n\t" \
178 "sw\t$23,"__str(PT_R23)"($29)\n\t" \
179 "sw\t$30,"__str(PT_R30)"($29)\n\t" \
180 + "j\t_" #symbol "\n\t" \
181 ".end\t" #symbol "\n\t" \
182 ".size\t" #symbol",. - " #symbol)
184 -/* Used in declaration of save_static functions. */
185 -#define static_unused static __attribute__((unused))
187 #endif /* !__ASSEMBLY__ */
189 /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
190 diff -Nur linux-2.4.29/include/asm-mips64/ptrace.h linux-2.4.29-gcc3.4/include/asm-mips64/ptrace.h
191 --- linux-2.4.29/include/asm-mips64/ptrace.h 2004-02-18 14:36:32.000000000 +0100
192 +++ linux-2.4.29-gcc3.4/include/asm-mips64/ptrace.h 2005-03-27 23:09:57.000000000 +0200
195 * Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 by Ralf Baechle
196 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
197 + * Copyright (C) 2004 Maciej W. Rozycki
199 #ifndef _ASM_PTRACE_H
200 #define _ASM_PTRACE_H
202 "sd\t$22,"__str(PT_R22)"($29)\n\t" \
203 "sd\t$23,"__str(PT_R23)"($29)\n\t" \
204 "sd\t$30,"__str(PT_R30)"($29)\n\t" \
205 + "j\t_" #symbol "\n\t" \
206 ".end\t" #symbol "\n\t" \
207 ".size\t" #symbol",. - " #symbol)
209 -/* Used in declaration of save_static functions. */
210 -#define static_unused static __attribute__((unused))
212 #define abi64_no_regargs \
213 unsigned long __dummy0, \
214 unsigned long __dummy1, \