uclibc: disable rpc support - replaced by the external librpc, saves ~80k
[openwrt.git] / toolchain / uClibc / patches-0.9.30.1 / 180-dl_sysdep_inline.patch
1 Index: uClibc-0.9.30.1/ldso/ldso/arm/dl-sysdep.h
2 ===================================================================
3 --- uClibc-0.9.30.1/ldso/ldso/arm/dl-sysdep.h   (revision 25503)
4 +++ uClibc-0.9.30.1/ldso/ldso/arm/dl-sysdep.h   (working copy)
5 @@ -15,7 +15,7 @@
6    GOT_BASE[1] = (unsigned long) MODULE; \
7  }
8  
9 -static __inline__ unsigned long arm_modulus(unsigned long m, unsigned long p)
10 +static __always_inline unsigned long arm_modulus(unsigned long m, unsigned long p)
11  {
12         unsigned long i,t,inc;
13         i=p; t=0;
14 @@ -72,7 +72,7 @@ unsigned long _dl_linux_resolver(struct 
15     first element of the GOT.  We used to use the PIC register to do this
16     without a constant pool reference, but GCC 4.2 will use a pseudo-register
17     for the PIC base, so it may not be in r10.  */
18 -static __inline__ Elf32_Addr __attribute__ ((unused))
19 +static __always_inline Elf32_Addr __attribute__ ((unused))
20  elf_machine_dynamic (void)
21  {
22    Elf32_Addr dynamic;
23 @@ -104,7 +104,7 @@ elf_machine_dynamic (void)
24  }
25  
26  /* Return the run-time load address of the shared object.  */
27 -static __inline__ Elf32_Addr __attribute__ ((unused))
28 +static __always_inline Elf32_Addr __attribute__ ((unused))
29  elf_machine_load_address (void)
30  {
31         extern void __dl_start __asm__ ("_dl_start");
32 @@ -128,7 +128,7 @@ elf_machine_load_address (void)
33         return pcrel_addr - got_addr;
34  }
35  
36 -static __inline__ void
37 +static __always_inline void
38  elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
39                       Elf32_Word relative_count)
40  {
41 Index: uClibc-0.9.30.1/ldso/ldso/powerpc/dl-sysdep.h
42 ===================================================================
43 --- uClibc-0.9.30.1/ldso/ldso/powerpc/dl-sysdep.h       (revision 25503)
44 +++ uClibc-0.9.30.1/ldso/ldso/powerpc/dl-sysdep.h       (working copy)
45 @@ -90,7 +90,7 @@ void _dl_init_got(unsigned long *lpnt,st
46  #define ELF_MACHINE_PLTREL_OVERLAP 1
47  
48  /* Return the value of the GOT pointer.  */
49 -static __inline__ Elf32_Addr * __attribute__ ((const))
50 +static __always_inline Elf32_Addr * __attribute__ ((const))
51  ppc_got (void)
52  {
53         Elf32_Addr *got;
54 @@ -109,14 +109,14 @@ ppc_got (void)
55  
56  /* Return the link-time address of _DYNAMIC, stored as
57     the first value in the GOT. */
58 -static __inline__ Elf32_Addr __attribute__ ((const))
59 +static __always_inline Elf32_Addr __attribute__ ((const))
60  elf_machine_dynamic (void)
61  {
62         return *ppc_got();
63  }
64  
65  /* Return the run-time load address of the shared object.  */
66 -static __inline__ Elf32_Addr __attribute__ ((const))
67 +static __always_inline Elf32_Addr __attribute__ ((const))
68  elf_machine_load_address (void)
69  {
70    Elf32_Addr *branchaddr;
71 @@ -164,7 +164,7 @@ elf_machine_load_address (void)
72    return runtime_dynamic - elf_machine_dynamic ();
73  }
74  
75 -static __inline__ void
76 +static __always_inline void
77  elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
78                       Elf32_Word relative_count)
79  {
80 Index: uClibc-0.9.30.1/ldso/ldso/sh64/dl-sysdep.h
81 ===================================================================
82 --- uClibc-0.9.30.1/ldso/ldso/sh64/dl-sysdep.h  (revision 25503)
83 +++ uClibc-0.9.30.1/ldso/ldso/sh64/dl-sysdep.h  (working copy)
84 @@ -42,7 +42,7 @@ extern unsigned long _dl_linux_resolver(
85  /* Return the link-time address of _DYNAMIC.  Conveniently, this is the
86     first element of the GOT.  This must be inlined in a function which
87     uses global data.  */
88 -static __inline__ Elf32_Addr elf_machine_dynamic(void)
89 +static __always_inline Elf32_Addr elf_machine_dynamic(void)
90  {
91         register Elf32_Addr *got;
92  
93 @@ -70,7 +70,7 @@ static __inline__ Elf32_Addr elf_machine
94  }
95  
96  /* Return the run-time load address of the shared object.  */
97 -static __inline__ Elf32_Addr elf_machine_load_address(void)
98 +static __always_inline Elf32_Addr elf_machine_load_address(void)
99  {
100         Elf32_Addr addr;
101  
102 @@ -123,7 +123,7 @@ static __inline__ Elf32_Addr elf_machine
103         }                                               \
104  }
105  
106 -static __inline__ void
107 +static __always_inline void
108  elf_machine_relative(Elf32_Addr load_off, const Elf32_Addr rel_addr,
109                      Elf32_Word relative_count)
110  {
111 Index: uClibc-0.9.30.1/ldso/ldso/m68k/dl-sysdep.h
112 ===================================================================
113 --- uClibc-0.9.30.1/ldso/ldso/m68k/dl-sysdep.h  (revision 25503)
114 +++ uClibc-0.9.30.1/ldso/ldso/m68k/dl-sysdep.h  (working copy)
115 @@ -41,7 +41,7 @@ extern unsigned long _dl_linux_resolver 
116  /* Return the link-time address of _DYNAMIC.  Conveniently, this is the
117     first element of the GOT.  This must be inlined in a function which
118     uses global data.  */
119 -static __inline__ Elf32_Addr
120 +static __always_inline Elf32_Addr
121  elf_machine_dynamic (void)
122  {
123         register Elf32_Addr *got __asm__ ("%a5");
124 @@ -50,7 +50,7 @@ elf_machine_dynamic (void)
125  
126  
127  /* Return the run-time load address of the shared object.  */
128 -static __inline__ Elf32_Addr
129 +static __always_inline Elf32_Addr
130  elf_machine_load_address (void)
131  {
132         Elf32_Addr addr;
133 @@ -60,7 +60,7 @@ elf_machine_load_address (void)
134         return addr;
135  }
136  
137 -static __inline__ void
138 +static __always_inline void
139  elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
140                       Elf32_Word relative_count)
141  {
142 Index: uClibc-0.9.30.1/ldso/ldso/i386/dl-sysdep.h
143 ===================================================================
144 --- uClibc-0.9.30.1/ldso/ldso/i386/dl-sysdep.h  (revision 25503)
145 +++ uClibc-0.9.30.1/ldso/ldso/i386/dl-sysdep.h  (working copy)
146 @@ -42,8 +42,8 @@ extern unsigned long _dl_linux_resolver(
147  /* Return the link-time address of _DYNAMIC.  Conveniently, this is the
148     first element of the GOT.  This must be inlined in a function which
149     uses global data.  */
150 -static __inline__ Elf32_Addr elf_machine_dynamic (void) attribute_unused;
151 -static __inline__ Elf32_Addr
152 +static __always_inline Elf32_Addr elf_machine_dynamic (void) attribute_unused;
153 +static __always_inline Elf32_Addr
154  elf_machine_dynamic (void)
155  {
156         register Elf32_Addr *got __asm__ ("%ebx");
157 @@ -52,8 +52,8 @@ elf_machine_dynamic (void)
158  
159  
160  /* Return the run-time load address of the shared object.  */
161 -static __inline__ Elf32_Addr elf_machine_load_address (void) attribute_unused;
162 -static __inline__ Elf32_Addr
163 +static __always_inline Elf32_Addr elf_machine_load_address (void) attribute_unused;
164 +static __always_inline Elf32_Addr
165  elf_machine_load_address (void)
166  {
167         /* It doesn't matter what variable this is, the reference never makes
168 @@ -66,7 +66,7 @@ elf_machine_load_address (void)
169         return addr;
170  }
171  
172 -static __inline__ void
173 +static __always_inline void
174  elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
175                       Elf32_Word relative_count)
176  {
177 Index: uClibc-0.9.30.1/ldso/ldso/cris/dl-sysdep.h
178 ===================================================================
179 --- uClibc-0.9.30.1/ldso/ldso/cris/dl-sysdep.h  (revision 25503)
180 +++ uClibc-0.9.30.1/ldso/ldso/cris/dl-sysdep.h  (working copy)
181 @@ -39,7 +39,7 @@ extern unsigned long _dl_linux_resolver(
182       || ((type) == R_CRIS_GLOB_DAT)) * ELF_RTYPE_CLASS_PLT)    \
183     | (((type) == R_CRIS_COPY) * ELF_RTYPE_CLASS_COPY))
184  
185 -static __inline__ Elf32_Addr
186 +static __always_inline Elf32_Addr
187  elf_machine_dynamic(void)
188  {
189         /* Don't just set this to an asm variable "r0" since that's not logical
190 @@ -61,7 +61,7 @@ elf_machine_dynamic(void)
191     there's some other symbol we could use, that we don't *have* to force a
192     GOT entry for.  */
193  
194 -static __inline__ Elf32_Addr
195 +static __always_inline Elf32_Addr
196  elf_machine_load_address(void)
197  {
198         Elf32_Addr gotaddr_diff;
199 @@ -95,7 +95,7 @@ elf_machine_load_address(void)
200         return gotaddr_diff;
201  }
202  
203 -static __inline__ void
204 +static __always_inline void
205  elf_machine_relative(Elf32_Addr load_off, const Elf32_Addr rel_addr,
206                       Elf32_Word relative_count)
207  {
208 Index: uClibc-0.9.30.1/ldso/ldso/xtensa/dl-sysdep.h
209 ===================================================================
210 --- uClibc-0.9.30.1/ldso/ldso/xtensa/dl-sysdep.h        (revision 25503)
211 +++ uClibc-0.9.30.1/ldso/ldso/xtensa/dl-sysdep.h        (working copy)
212 @@ -87,7 +87,7 @@ extern unsigned long _dl_linux_resolver 
213    (((type) == R_XTENSA_JMP_SLOT) * ELF_RTYPE_CLASS_PLT)
214  
215  /* Return the link-time address of _DYNAMIC.  */
216 -static __inline__ Elf32_Addr
217 +static __always_inline Elf32_Addr
218  elf_machine_dynamic (void)
219  {
220    /* This function is only used while bootstrapping the runtime linker.
221 @@ -97,7 +97,7 @@ elf_machine_dynamic (void)
222  }
223  
224  /* Return the run-time load address of the shared object.  */
225 -static __inline__ Elf32_Addr
226 +static __always_inline Elf32_Addr
227  elf_machine_load_address (void)
228  {
229    Elf32_Addr addr, tmp;
230 @@ -118,7 +118,7 @@ elf_machine_load_address (void)
231    return addr - 3;
232  }
233  
234 -static __inline__ void
235 +static __always_inline void
236  elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
237                       Elf32_Word relative_count)
238  {
239 Index: uClibc-0.9.30.1/ldso/ldso/sparc/dl-sysdep.h
240 ===================================================================
241 --- uClibc-0.9.30.1/ldso/ldso/sparc/dl-sysdep.h (revision 25503)
242 +++ uClibc-0.9.30.1/ldso/ldso/sparc/dl-sysdep.h (working copy)
243 @@ -49,7 +49,7 @@ unsigned long _dl_linux_resolver(struct 
244  
245  #ifndef COMPILE_ASM
246  /* Cheap modulo implementation, taken from arm/ld_sysdep.h. */
247 -static __inline__ unsigned long
248 +static __always_inline unsigned long
249  sparc_mod(unsigned long m, unsigned long p)
250  {
251         unsigned long i, t, inc;
252 @@ -127,7 +127,7 @@ do {    register Elf32_Addr pc __asm__("
253  /* Return the link-time address of _DYNAMIC.  Conveniently, this is the
254     first element of the GOT.  This must be inlined in a function which
255     uses global data.  */
256 -static __inline__ Elf32_Addr
257 +static __always_inline Elf32_Addr
258  elf_machine_dynamic (void)
259  {
260         register Elf32_Addr *got __asm__ ("%l7");
261 @@ -138,7 +138,7 @@ elf_machine_dynamic (void)
262  }
263  
264  /* Return the run-time load address of the shared object.  */
265 -static __inline__ Elf32_Addr
266 +static __always_inline Elf32_Addr
267  elf_machine_load_address (void)
268  {
269         register Elf32_Addr *pc __asm__ ("%o7"), *got __asm__ ("%l7");
270 @@ -157,7 +157,7 @@ elf_machine_load_address (void)
271         return (Elf32_Addr) got - *got + (pc[2] - pc[3]) * 4 - 4;
272  }
273  
274 -static __inline__ void
275 +static __always_inline void
276  elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
277                       Elf32_Word relative_count)
278  {
279 Index: uClibc-0.9.30.1/ldso/ldso/mips/dl-sysdep.h
280 ===================================================================
281 --- uClibc-0.9.30.1/ldso/ldso/mips/dl-sysdep.h  (revision 25503)
282 +++ uClibc-0.9.30.1/ldso/ldso/mips/dl-sysdep.h  (working copy)
283 @@ -163,7 +163,7 @@ void _dl_perform_mips_global_got_relocat
284  
285  #define OFFSET_GP_GOT 0x7ff0
286  
287 -static __inline__ ElfW(Addr) *
288 +static __always_inline ElfW(Addr) *
289  elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
290  {
291         /* FIXME: the offset of gp from GOT may be system-dependent. */
292 @@ -173,7 +173,7 @@ elf_mips_got_from_gpreg (ElfW(Addr) gpre
293  /* Return the link-time address of _DYNAMIC.  Conveniently, this is the
294     first element of the GOT.  This must be inlined in a function which
295     uses global data.  We assume its $gp points to the primary GOT.  */
296 -static __inline__ ElfW(Addr)
297 +static __always_inline ElfW(Addr)
298  elf_machine_dynamic (void)
299  {
300         register ElfW(Addr) gp __asm__ ("$28");
301 @@ -192,7 +192,7 @@ elf_machine_dynamic (void)
302  #endif
303  
304  /* Return the run-time load address of the shared object.  */
305 -static __inline__ ElfW(Addr)
306 +static __always_inline ElfW(Addr)
307  elf_machine_load_address (void)
308  {
309         ElfW(Addr) addr;
310 @@ -208,7 +208,7 @@ elf_machine_load_address (void)
311         return addr;
312  }
313  
314 -static __inline__ void
315 +static __always_inline void
316  elf_machine_relative (ElfW(Addr) load_off, const ElfW(Addr) rel_addr,
317                       ElfW(Word) relative_count)
318  {
319 Index: uClibc-0.9.30.1/ldso/ldso/sh/dl-sysdep.h
320 ===================================================================
321 --- uClibc-0.9.30.1/ldso/ldso/sh/dl-sysdep.h    (revision 25503)
322 +++ uClibc-0.9.30.1/ldso/ldso/sh/dl-sysdep.h    (working copy)
323 @@ -25,7 +25,7 @@
324  struct elf_resolve;
325  extern unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry);
326  
327 -static __inline__ unsigned int
328 +static __always_inline unsigned int
329  _dl_urem(unsigned int n, unsigned int base)
330  {
331    int res;
332 @@ -100,7 +100,7 @@ _dl_urem(unsigned int n, unsigned int ba
333  /* Return the link-time address of _DYNAMIC.  Conveniently, this is the
334     first element of the GOT.  This must be inlined in a function which
335     uses global data.  */
336 -static __inline__ Elf32_Addr __attribute__ ((unused))
337 +static __always_inline Elf32_Addr __attribute__ ((unused))
338  elf_machine_dynamic (void)
339  {
340         register Elf32_Addr *got;
341 @@ -109,7 +109,7 @@ elf_machine_dynamic (void)
342  }
343  
344  /* Return the run-time load address of the shared object.  */
345 -static __inline__ Elf32_Addr __attribute__ ((unused))
346 +static __always_inline Elf32_Addr __attribute__ ((unused))
347  elf_machine_load_address (void)
348  {
349         Elf32_Addr addr;
350 @@ -151,7 +151,7 @@ elf_machine_load_address (void)
351      } \
352    }
353  
354 -static __inline__ void
355 +static __always_inline void
356  elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
357                       Elf32_Word relative_count)
358  {
359 Index: uClibc-0.9.30.1/ldso/ldso/bfin/dl-sysdep.h
360 ===================================================================
361 --- uClibc-0.9.30.1/ldso/ldso/bfin/dl-sysdep.h  (revision 25503)
362 +++ uClibc-0.9.30.1/ldso/ldso/bfin/dl-sysdep.h  (working copy)
363 @@ -213,7 +213,7 @@ while (0)
364  #endif
365  
366  #include <elf.h>
367 -static __inline__ void
368 +static __always_inline void
369  elf_machine_relative (DL_LOADADDR_TYPE load_off, const Elf32_Addr rel_addr,
370                       Elf32_Word relative_count)
371  {