Contents of /trunk/glibc/patches/glibc-2.3.5-gcc4_fix_elf-2.patch
Parent Directory | Revision Log
Revision 144 -
(show annotations)
(download)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 19102 byte(s)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 19102 byte(s)
-import
1 | Submitted By: Matthew Burgess <matthew@linuxfromscratch.org> |
2 | Date: 2005-08-28 |
3 | Initial Package Version: 2.3.5 |
4 | Upstream Status: From Upstream and Debian |
5 | Origin: Ryan Oliver, courtesy of upstream CVS and Dan Kegel's crosstool |
6 | (http://kegel.com/crosstool/) |
7 | Description: Fixes a compilation problem with gcc-4.0.x that results in: |
8 | rtld.c: In function '_dl_start': |
9 | dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared |
10 | but never defined |
11 | dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but |
12 | never defined |
13 | Updated by Jim Gifford from Debian patch to fix Sparc 64 Bit build |
14 | |
15 | diff -Naur glibc-2.3.5.orig/elf/dynamic-link.h glibc-2.3.5/elf/dynamic-link.h |
16 | --- glibc-2.3.5.orig/elf/dynamic-link.h 2004-09-24 17:09:03.000000000 +0000 |
17 | +++ glibc-2.3.5/elf/dynamic-link.h 2005-08-28 17:31:19.000000000 +0000 |
18 | @@ -1,5 +1,5 @@ |
19 | /* Inline functions for dynamic linking. |
20 | - Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc. |
21 | + Copyright (C) 1995-2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
22 | This file is part of the GNU C Library. |
23 | |
24 | The GNU C Library is free software; you can redistribute it and/or |
25 | @@ -31,26 +31,30 @@ |
26 | optimizing away alignment tests or using word instructions for |
27 | copying memory, breaking the very code written to handle the |
28 | unaligned cases. */ |
29 | -auto void __attribute__((always_inline)) |
30 | +# if ! ELF_MACHINE_NO_REL |
31 | +auto inline void __attribute__((always_inline)) |
32 | elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, |
33 | const ElfW(Sym) *sym, const struct r_found_version *version, |
34 | void *const reloc_addr); |
35 | -auto void __attribute__((always_inline)) |
36 | +auto inline void __attribute__((always_inline)) |
37 | +elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, |
38 | + void *const reloc_addr); |
39 | +# endif |
40 | +# if ! ELF_MACHINE_NO_RELA |
41 | +auto inline void __attribute__((always_inline)) |
42 | elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, |
43 | const ElfW(Sym) *sym, const struct r_found_version *version, |
44 | void *const reloc_addr); |
45 | -auto void __attribute__((always_inline)) |
46 | -elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, |
47 | - void *const reloc_addr); |
48 | -auto void __attribute__((always_inline)) |
49 | +auto inline void __attribute__((always_inline)) |
50 | elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc, |
51 | void *const reloc_addr); |
52 | +# endif |
53 | # if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL |
54 | -auto void __attribute__((always_inline)) |
55 | +auto inline void __attribute__((always_inline)) |
56 | elf_machine_lazy_rel (struct link_map *map, |
57 | ElfW(Addr) l_addr, const ElfW(Rel) *reloc); |
58 | # else |
59 | -auto void __attribute__((always_inline)) |
60 | +auto inline void __attribute__((always_inline)) |
61 | elf_machine_lazy_rel (struct link_map *map, |
62 | ElfW(Addr) l_addr, const ElfW(Rela) *reloc); |
63 | # endif |
64 | diff -Naur glibc-2.3.5.orig/sysdeps/alpha/dl-machine.h glibc-2.3.5/sysdeps/alpha/dl-machine.h |
65 | --- glibc-2.3.5.orig/sysdeps/alpha/dl-machine.h 2004-10-15 07:06:11.000000000 +0000 |
66 | +++ glibc-2.3.5/sysdeps/alpha/dl-machine.h 2005-08-28 17:31:19.000000000 +0000 |
67 | @@ -1,5 +1,5 @@ |
68 | /* Machine-dependent ELF dynamic relocation inline functions. Alpha version. |
69 | - Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc. |
70 | + Copyright (C) 1996-2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
71 | This file is part of the GNU C Library. |
72 | Contributed by Richard Henderson <rth@tamu.edu>. |
73 | |
74 | @@ -508,6 +508,7 @@ |
75 | /* Perform the relocation specified by RELOC and SYM (which is fully resolved). |
76 | MAP is the object containing the reloc. */ |
77 | auto inline void |
78 | +__attribute__ ((always_inline)) |
79 | elf_machine_rela (struct link_map *map, |
80 | const Elf64_Rela *reloc, |
81 | const Elf64_Sym *sym, |
82 | @@ -646,6 +647,7 @@ |
83 | #define ELF_MACHINE_REL_RELATIVE 1 |
84 | |
85 | auto inline void |
86 | +__attribute__ ((always_inline)) |
87 | elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, |
88 | void *const reloc_addr_arg) |
89 | { |
90 | @@ -662,6 +664,7 @@ |
91 | } |
92 | |
93 | auto inline void |
94 | +__attribute__ ((always_inline)) |
95 | elf_machine_lazy_rel (struct link_map *map, |
96 | Elf64_Addr l_addr, const Elf64_Rela *reloc) |
97 | { |
98 | diff -Naur glibc-2.3.5.orig/sysdeps/arm/dl-machine.h glibc-2.3.5/sysdeps/arm/dl-machine.h |
99 | --- glibc-2.3.5.orig/sysdeps/arm/dl-machine.h 2004-12-04 21:20:17.000000000 +0000 |
100 | +++ glibc-2.3.5/sysdeps/arm/dl-machine.h 2005-08-28 17:31:19.000000000 +0000 |
101 | @@ -350,16 +350,15 @@ |
102 | |
103 | #endif /* !dl_machine_h */ |
104 | |
105 | -#ifdef RESOLVE |
106 | - |
107 | /* ARM never uses Elf32_Rela relocations for the dynamic linker. |
108 | Prelinked libraries may use Elf32_Rela though. */ |
109 | -# ifdef RTLD_BOOTSTRAP |
110 | -# define ELF_MACHINE_NO_RELA 1 |
111 | -# endif |
112 | +#define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP |
113 | + |
114 | +#ifdef RESOLVE |
115 | |
116 | /* Deal with an out-of-range PC24 reloc. */ |
117 | -static Elf32_Addr |
118 | +auto inline Elf32_Addr |
119 | +__attribute__ ((always_inline)) |
120 | fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value) |
121 | { |
122 | static void *fix_page; |
123 | @@ -392,7 +391,8 @@ |
124 | /* Perform the relocation specified by RELOC and SYM (which is fully resolved). |
125 | MAP is the object containing the reloc. */ |
126 | |
127 | -static inline void |
128 | +auto inline void |
129 | +__attribute__ ((always_inline)) |
130 | elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, |
131 | const Elf32_Sym *sym, const struct r_found_version *version, |
132 | void *const reloc_addr_arg) |
133 | @@ -517,7 +517,8 @@ |
134 | } |
135 | |
136 | # ifndef RTLD_BOOTSTRAP |
137 | -static inline void |
138 | +auto inline void |
139 | +__attribute__ ((always_inline)) |
140 | elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, |
141 | const Elf32_Sym *sym, const struct r_found_version *version, |
142 | void *const reloc_addr_arg) |
143 | @@ -597,7 +598,8 @@ |
144 | } |
145 | # endif |
146 | |
147 | -static inline void |
148 | +auto inline void |
149 | +__attribute__ ((always_inline)) |
150 | elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc, |
151 | void *const reloc_addr_arg) |
152 | { |
153 | @@ -606,7 +608,8 @@ |
154 | } |
155 | |
156 | # ifndef RTLD_BOOTSTRAP |
157 | -static inline void |
158 | +auto inline void |
159 | +__attribute__ ((always_inline)) |
160 | elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, |
161 | void *const reloc_addr_arg) |
162 | { |
163 | @@ -615,7 +618,8 @@ |
164 | } |
165 | # endif |
166 | |
167 | -static inline void |
168 | +auto inline void |
169 | +__attribute__ ((always_inline)) |
170 | elf_machine_lazy_rel (struct link_map *map, |
171 | Elf32_Addr l_addr, const Elf32_Rel *reloc) |
172 | { |
173 | diff -Naur glibc-2.3.5.orig/sysdeps/generic/dl-machine.h glibc-2.3.5/sysdeps/generic/dl-machine.h |
174 | --- glibc-2.3.5.orig/sysdeps/generic/dl-machine.h 2001-09-08 17:16:43.000000000 +0000 |
175 | +++ glibc-2.3.5/sysdeps/generic/dl-machine.h 2005-08-28 17:31:19.000000000 +0000 |
176 | @@ -1,5 +1,6 @@ |
177 | /* Machine-dependent ELF dynamic relocation inline functions. Stub version. |
178 | - Copyright (C) 1995,1996,1997,1999,2000,2001 Free Software Foundation, Inc. |
179 | + Copyright (C) 1995, 1996, 1997, 1999, 2000, 2001, 2005 |
180 | + Free Software Foundation, Inc. |
181 | This file is part of the GNU C Library. |
182 | |
183 | The GNU C Library is free software; you can redistribute it and/or |
184 | @@ -64,7 +65,8 @@ |
185 | LOADADDR is the load address of the object; INFO is an array indexed |
186 | by DT_* of the .dynamic section info. */ |
187 | |
188 | -static inline void |
189 | +auto inline void |
190 | +__attribute__ ((always_inline)) |
191 | elf_machine_rel (Elf32_Addr loadaddr, Elf32_Dyn *info[DT_NUM], |
192 | const Elf32_Rel *reloc, const Elf32_Sym *sym, |
193 | Elf32_Addr (*resolve) (const Elf32_Sym **ref, |
194 | @@ -87,7 +89,8 @@ |
195 | } |
196 | |
197 | |
198 | -static inline Elf32_Addr |
199 | +auto inline Elf32_Addr |
200 | +__attribute__ ((always_inline)) |
201 | elf_machine_rela (Elf32_Addr loadaddr, Elf32_Dyn *info[DT_NUM], |
202 | const Elf32_Rel *reloc, const Elf32_Sym *sym, |
203 | Elf32_Addr (*resolve) (const Elf32_Sym **ref, |
204 | diff -Naur glibc-2.3.5.orig/sysdeps/i386/dl-machine.h glibc-2.3.5/sysdeps/i386/dl-machine.h |
205 | --- glibc-2.3.5.orig/sysdeps/i386/dl-machine.h 2005-02-16 10:58:03.000000000 +0000 |
206 | +++ glibc-2.3.5/sysdeps/i386/dl-machine.h 2005-08-28 17:31:19.000000000 +0000 |
207 | @@ -387,13 +387,11 @@ |
208 | |
209 | #endif /* !dl_machine_h */ |
210 | |
211 | -#ifdef RESOLVE |
212 | - |
213 | /* The i386 never uses Elf32_Rela relocations for the dynamic linker. |
214 | Prelinked libraries may use Elf32_Rela though. */ |
215 | -#ifdef RTLD_BOOTSTRAP |
216 | -# define ELF_MACHINE_NO_RELA 1 |
217 | -#endif |
218 | +#define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP |
219 | + |
220 | +#ifdef RESOLVE |
221 | |
222 | /* Perform the relocation specified by RELOC and SYM (which is fully resolved). |
223 | MAP is the object containing the reloc. */ |
224 | diff -Naur glibc-2.3.5.orig/sysdeps/mips/dl-machine.h glibc-2.3.5/sysdeps/mips/dl-machine.h |
225 | --- glibc-2.3.5.orig/sysdeps/mips/dl-machine.h 2004-11-24 04:36:09.000000000 +0000 |
226 | +++ glibc-2.3.5/sysdeps/mips/dl-machine.h 2005-08-28 17:31:19.000000000 +0000 |
227 | @@ -528,7 +528,7 @@ |
228 | /* Perform the relocation specified by RELOC and SYM (which is fully resolved). |
229 | MAP is the object containing the reloc. */ |
230 | |
231 | -static inline void |
232 | +auto inline void |
233 | #ifdef RTLD_BOOTSTRAP |
234 | __attribute__ ((always_inline)) |
235 | #endif |
236 | @@ -635,14 +635,16 @@ |
237 | } |
238 | } |
239 | |
240 | -static inline void |
241 | +auto inline void |
242 | +__attribute__((always_inline)) |
243 | elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, |
244 | void *const reloc_addr) |
245 | { |
246 | /* XXX Nothing to do. There is no relative relocation, right? */ |
247 | } |
248 | |
249 | -static inline void |
250 | +auto inline void |
251 | +__attribute__((always_inline)) |
252 | elf_machine_lazy_rel (struct link_map *map, |
253 | ElfW(Addr) l_addr, const ElfW(Rel) *reloc) |
254 | { |
255 | @@ -651,7 +653,8 @@ |
256 | |
257 | #ifndef RTLD_BOOTSTRAP |
258 | /* Relocate GOT. */ |
259 | -static inline void |
260 | +auto inline void |
261 | +__attribute__((always_inline)) |
262 | elf_machine_got_rel (struct link_map *map, int lazy) |
263 | { |
264 | ElfW(Addr) *got; |
265 | @@ -738,7 +741,8 @@ |
266 | /* Set up the loaded object described by L so its stub function |
267 | will jump to the on-demand fixup code __dl_runtime_resolve. */ |
268 | |
269 | -static inline int |
270 | +auto inline int |
271 | +__attribute__((always_inline)) |
272 | elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) |
273 | { |
274 | # ifndef RTLD_BOOTSTRAP |
275 | diff -Naur glibc-2.3.5.orig/sysdeps/powerpc/powerpc32/dl-machine.h glibc-2.3.5/sysdeps/powerpc/powerpc32/dl-machine.h |
276 | --- glibc-2.3.5.orig/sysdeps/powerpc/powerpc32/dl-machine.h 2003-07-31 06:33:52.000000000 +0000 |
277 | +++ glibc-2.3.5/sysdeps/powerpc/powerpc32/dl-machine.h 2005-08-28 17:31:19.000000000 +0000 |
278 | @@ -353,7 +353,7 @@ |
279 | LOADADDR is the load address of the object; INFO is an array indexed |
280 | by DT_* of the .dynamic section info. */ |
281 | |
282 | -inline void |
283 | +auto inline void __attribute__ ((always_inline)) |
284 | elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, |
285 | const Elf32_Sym *sym, const struct r_found_version *version, |
286 | void *const reloc_addr_arg) |
287 | @@ -455,7 +455,7 @@ |
288 | } |
289 | } |
290 | |
291 | -static inline void |
292 | +auto inline void __attribute__ ((always_inline)) |
293 | elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, |
294 | void *const reloc_addr_arg) |
295 | { |
296 | @@ -463,7 +463,7 @@ |
297 | *reloc_addr = l_addr + reloc->r_addend; |
298 | } |
299 | |
300 | -static inline void |
301 | +auto inline void __attribute__ ((always_inline)) |
302 | elf_machine_lazy_rel (struct link_map *map, |
303 | Elf32_Addr l_addr, const Elf32_Rela *reloc) |
304 | { |
305 | diff -Naur glibc-2.3.5.orig/sysdeps/powerpc/powerpc64/dl-machine.h glibc-2.3.5/sysdeps/powerpc/powerpc64/dl-machine.h |
306 | --- glibc-2.3.5.orig/sysdeps/powerpc/powerpc64/dl-machine.h 2004-09-08 06:57:14.000000000 +0000 |
307 | +++ glibc-2.3.5/sysdeps/powerpc/powerpc64/dl-machine.h 2005-08-28 17:31:19.000000000 +0000 |
308 | @@ -567,7 +567,7 @@ |
309 | const Elf64_Sym *refsym) |
310 | attribute_hidden; |
311 | |
312 | -static inline void |
313 | +auto inline void __attribute__ ((always_inline)) |
314 | elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, |
315 | void *const reloc_addr_arg) |
316 | { |
317 | @@ -577,7 +577,7 @@ |
318 | |
319 | #if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD) |
320 | /* This computes the value used by TPREL* relocs. */ |
321 | -static Elf64_Addr __attribute__ ((const)) |
322 | +auto inline Elf64_Addr __attribute__ ((always_inline, const)) |
323 | elf_machine_tprel (struct link_map *map, |
324 | struct link_map *sym_map, |
325 | const Elf64_Sym *sym, |
326 | @@ -598,7 +598,7 @@ |
327 | |
328 | /* Perform the relocation specified by RELOC and SYM (which is fully |
329 | resolved). MAP is the object containing the reloc. */ |
330 | -static inline void |
331 | +auto inline void __attribute__ ((always_inline)) |
332 | elf_machine_rela (struct link_map *map, |
333 | const Elf64_Rela *reloc, |
334 | const Elf64_Sym *sym, |
335 | @@ -883,11 +883,12 @@ |
336 | MODIFIED_CODE_NOQUEUE (reloc_addr); |
337 | } |
338 | |
339 | -static inline void |
340 | +auto inline void __attribute__ ((always_inline)) |
341 | elf_machine_lazy_rel (struct link_map *map, |
342 | Elf64_Addr l_addr, const Elf64_Rela *reloc) |
343 | { |
344 | /* elf_machine_runtime_setup handles this. */ |
345 | } |
346 | |
347 | + |
348 | #endif /* RESOLVE */ |
349 | diff -Naur glibc-2.3.5.orig/sysdeps/sparc/sparc32/dl-machine.h glibc-2.3.5/sysdeps/sparc/sparc32/dl-machine.h |
350 | --- glibc-2.3.5.orig/sysdeps/sparc/sparc32/dl-machine.h 2004-05-17 18:20:30.000000000 +0000 |
351 | +++ glibc-2.3.5/sysdeps/sparc/sparc32/dl-machine.h 2005-08-28 17:32:10.000000000 +0000 |
352 | @@ -411,7 +411,14 @@ |
353 | /* Perform the relocation specified by RELOC and SYM (which is fully resolved). |
354 | MAP is the object containing the reloc. */ |
355 | |
356 | -static inline void |
357 | +#if __GNUC__ >= 4 |
358 | + auto inline void |
359 | +#else |
360 | + static inline void |
361 | +#endif |
362 | +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) |
363 | + __attribute ((always_inline)) |
364 | +#endif |
365 | elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, |
366 | const Elf32_Sym *sym, const struct r_found_version *version, |
367 | void *const reloc_addr_arg) |
368 | @@ -593,7 +600,14 @@ |
369 | } |
370 | } |
371 | |
372 | -static inline void |
373 | +#if __GNUC__ >= 4 |
374 | + auto inline void |
375 | +#else |
376 | + static inline void |
377 | +#endif |
378 | +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) |
379 | + __attribute ((always_inline)) |
380 | +#endif |
381 | elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, |
382 | void *const reloc_addr_arg) |
383 | { |
384 | @@ -601,7 +615,14 @@ |
385 | *reloc_addr += l_addr + reloc->r_addend; |
386 | } |
387 | |
388 | -static inline void |
389 | +#if __GNUC__ >= 4 |
390 | + auto inline void |
391 | +#else |
392 | + static inline void |
393 | +#endif |
394 | +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) |
395 | + __attribute ((always_inline)) |
396 | +#endif |
397 | elf_machine_lazy_rel (struct link_map *map, |
398 | Elf32_Addr l_addr, const Elf32_Rela *reloc) |
399 | { |
400 | diff -Naur glibc-2.3.5.orig/sysdeps/sparc/sparc64/dl-machine.h glibc-2.3.5/sysdeps/sparc/sparc64/dl-machine.h |
401 | --- glibc-2.3.5.orig/sysdeps/sparc/sparc64/dl-machine.h 2004-03-05 10:27:55.000000000 +0000 |
402 | +++ glibc-2.3.5/sysdeps/sparc/sparc64/dl-machine.h 2005-08-28 17:32:10.000000000 +0000 |
403 | @@ -34,7 +34,18 @@ |
404 | #define ELF64_R_TYPE_DATA(info) ((info) >> 8) |
405 | |
406 | /* Return nonzero iff ELF header is compatible with the running host. */ |
407 | -static inline int |
408 | +#if __GNUC__ >= 4 |
409 | +# ifdef RESOLVE |
410 | + auto inline int |
411 | +# else |
412 | + static inline int |
413 | +# endif |
414 | +#else |
415 | + static inline int |
416 | +#endif |
417 | +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) |
418 | + __attribute ((always_inline)) |
419 | +#endif |
420 | elf_machine_matches_host (const Elf64_Ehdr *ehdr) |
421 | { |
422 | return ehdr->e_machine == EM_SPARCV9; |
423 | @@ -55,7 +66,18 @@ |
424 | /* Return the link-time address of _DYNAMIC. Conveniently, this is the |
425 | first element of the GOT. This must be inlined in a function which |
426 | uses global data. */ |
427 | -static inline Elf64_Addr |
428 | +#if __GNUC__ >= 4 |
429 | +# ifdef RESOLVE |
430 | + auto inline Elf64_Addr |
431 | +# else |
432 | + static inline Elf64_Addr |
433 | +# endif |
434 | +#else |
435 | + static inline Elf64_Addr |
436 | +#endif |
437 | +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) |
438 | + __attribute ((always_inline)) |
439 | +#endif |
440 | elf_machine_dynamic (void) |
441 | { |
442 | register Elf64_Addr *elf_pic_register __asm__("%l7"); |
443 | @@ -66,7 +88,18 @@ |
444 | } |
445 | |
446 | /* Return the run-time load address of the shared object. */ |
447 | -static inline Elf64_Addr |
448 | +#if __GNUC__ >= 4 |
449 | +# ifdef RESOLVE |
450 | + auto inline Elf64_Addr |
451 | +# else |
452 | + static inline Elf64_Addr |
453 | +# endif |
454 | +#else |
455 | + static inline Elf64_Addr |
456 | +#endif |
457 | +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) |
458 | + __attribute ((always_inline)) |
459 | +#endif |
460 | elf_machine_load_address (void) |
461 | { |
462 | register Elf32_Addr *pc __asm ("%o7"); |
463 | @@ -88,7 +121,18 @@ |
464 | |
465 | /* We have 4 cases to handle. And we code different code sequences |
466 | for each one. I love V9 code models... */ |
467 | -static inline void |
468 | +#if __GNUC__ >= 4 |
469 | +# ifdef RESOLVE |
470 | + auto inline void |
471 | +# else |
472 | + static inline void |
473 | +# endif |
474 | +#else |
475 | + static inline void |
476 | +#endif |
477 | +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) |
478 | + __attribute ((always_inline)) |
479 | +#endif |
480 | sparc64_fixup_plt (struct link_map *map, const Elf64_Rela *reloc, |
481 | Elf64_Addr *reloc_addr, Elf64_Addr value, |
482 | Elf64_Addr high, int t) |
483 | @@ -212,7 +256,18 @@ |
484 | } |
485 | } |
486 | |
487 | -static inline Elf64_Addr |
488 | +#if __GNUC__ >= 4 |
489 | +# ifdef RESOLVE |
490 | + auto inline Elf64_Addr |
491 | +# else |
492 | + static inline Elf64_Addr |
493 | +# endif |
494 | +#else |
495 | + static inline Elf64_Addr |
496 | +#endif |
497 | +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) |
498 | + __attribute ((always_inline)) |
499 | +#endif |
500 | elf_machine_fixup_plt (struct link_map *map, lookup_t t, |
501 | const Elf64_Rela *reloc, |
502 | Elf64_Addr *reloc_addr, Elf64_Addr value) |
503 | @@ -223,7 +278,18 @@ |
504 | } |
505 | |
506 | /* Return the final value of a plt relocation. */ |
507 | -static inline Elf64_Addr |
508 | +#if __GNUC__ >= 4 |
509 | +# ifdef RESOLVE |
510 | + auto inline Elf64_Addr |
511 | +# else |
512 | + static inline Elf64_Addr |
513 | +# endif |
514 | +#else |
515 | + static inline Elf64_Addr |
516 | +#endif |
517 | +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) |
518 | + __attribute ((always_inline)) |
519 | +#endif |
520 | elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc, |
521 | Elf64_Addr value) |
522 | { |
523 | @@ -238,7 +304,14 @@ |
524 | /* Perform the relocation specified by RELOC and SYM (which is fully resolved). |
525 | MAP is the object containing the reloc. */ |
526 | |
527 | -static inline void |
528 | +#if __GNUC__ >= 4 |
529 | + auto inline void |
530 | +#else |
531 | + static inline void |
532 | +#endif |
533 | +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) |
534 | + __attribute ((always_inline)) |
535 | +#endif |
536 | elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, |
537 | const Elf64_Sym *sym, const struct r_found_version *version, |
538 | void *const reloc_addr_arg) |
539 | @@ -430,7 +503,14 @@ |
540 | } |
541 | } |
542 | |
543 | -static inline void |
544 | +#if __GNUC__ >= 4 |
545 | + auto inline void |
546 | +#else |
547 | + static inline void |
548 | +#endif |
549 | +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) |
550 | + __attribute ((always_inline)) |
551 | +#endif |
552 | elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, |
553 | void *const reloc_addr_arg) |
554 | { |
555 | @@ -438,7 +518,14 @@ |
556 | *reloc_addr = l_addr + reloc->r_addend; |
557 | } |
558 | |
559 | -static inline void |
560 | +#if __GNUC__ >= 4 |
561 | + auto inline void |
562 | +#else |
563 | + static inline void |
564 | +#endif |
565 | +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) |
566 | + __attribute ((always_inline)) |
567 | +#endif |
568 | elf_machine_lazy_rel (struct link_map *map, |
569 | Elf64_Addr l_addr, const Elf64_Rela *reloc) |
570 | { |
571 | @@ -476,7 +563,18 @@ |
572 | /* Set up the loaded object described by L so its unrelocated PLT |
573 | entries will jump to the on-demand fixup code in dl-runtime.c. */ |
574 | |
575 | -static inline int |
576 | +#if __GNUC__ >= 4 |
577 | +# ifdef RESOLVE |
578 | + auto inline int |
579 | +# else |
580 | + static inline int |
581 | +# endif |
582 | +#else |
583 | + static inline int |
584 | +#endif |
585 | +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) |
586 | + __attribute ((always_inline)) |
587 | +#endif |
588 | elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) |
589 | { |
590 | if (l->l_info[DT_JMPREL] && lazy) |