source: scripts/patches/glibc-2.3.4-gcc4_elf_fixes.patch@ 0801e7a

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 0801e7a was 7f65c0e, checked in by Jim Gifford <clfs@…>, 19 years ago

r625@server (orig r623): jim | 2005-10-31 12:43:24 -0800
Final Move

  • Property mode set to 100644
File size: 17.8 KB
RevLine 
[617118d]1Submitted By: Ryan Oliver <ryan.oliver@pha.com.au>
2Date: 2005-05-03 (updated 2005-06-03)
3Initial Package Version: 2.3.4
4Origin: glibc cvs
5 libc/elf/dynamic-link.h -r1.54
6 libc/sysdeps/alpha/dl-machine.h -r1.81
7 libc/sysdeps/arm/dl-machine.h
8 - fix_bad_pc24 fix from Dan Kegel's crosstool
9 - remainder from -r1.52
10 libc/sysdeps/generic/dl-machine.h -r1.9
11 libc/sysdeps/mips/dl-machine.h -r1.77
12 - fixes cherry picked from this version
13 libc/sysdeps/powepc/powerpc32/dl-machine.h -r1.13
14 libc/sysdeps/powepc/powerpc64/dl-machine.h -r1.23
15 libc/sysdeps/sparc/sparc64/dl-machine.h -r1.48
16 libc/sysdeps/i386/dl-machine.h -r1.134 (except using RESOLVE)
17Upstream Status: See Origin, all except fix_bad_pc24 fixed in glibc cvs
18Description:
19
202005-03-15 Jakub Jelinek <jakub@redhat.com>
21
22 * elf/dynamic-link.h (elf_machine_rel, elf_machine_rel_relative,
23 elf_machine_rela, elf_machine_rela_relative, elf_machine_lazy_rel):
24 Add inline keyword.
25 * sysdeps/alpha/dl-machine.h (elf_machine_rela,
26 elf_machine_rela_relative, elf_machine_lazy_rel): Add always_inline
27 attribute.
28 * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela,
29 elf_machine_rela_relative, elf_machine_lazy_rel): Likewise. Change
30 static inline into auto inline.
31 * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela,
32 elf_machine_rela_relative, elf_machine_lazy_rel): Likewise.
33 * sysdeps/generic/dl-machine.h (elf_machine_rel, elf_machine_rela):
34 Likewise.
35 * sysdeps/arm/dl-machine.h (elf_machine_rel, elf_machine_rel_relative,
36 elf_machine_rela, elf_machine_rela_relative, elf_machine_lazy_rel):
37 Likewise.
38
392005-03-05 Jakub Jelinek <jakub@redhat.com>
40
41 * sysdeps/i386/dl-machine.h (ELF_MACHINE_NO_RELA): Define
42 unconditionally to (defined RTLD_BOOTSTRAP).
43 * sysdeps/arm/dl-machine.h (ELF_MACHINE_NO_RELA): Likewise
44
452005-03-01 Roland McGrath <roland@redhat.com>
46
47 [BZ #721]
48 * sysdeps/arm/dl-machine.h (ELF_MACHINE_NO_RELA): Define this outside
49 of [RESOLVE_MAP]
50
512005-02-16 Roland McGrath <roland@redhat.com>
52
53 [BZ #721]
54 * sysdeps/i386/dl-machine.h (ELF_MACHINE_NO_RELA): Define this outside
55 of [RESOLVE_MAP].
56 * sysdeps/sh/dl-machine.h (ELF_MACHINE_NO_REL): Likewise.
57 * sysdeps/powerpc/powerpc32/dl-machine.h
58 (elf_machine_rel, elf_machine_rel_relative): Removed.
59 * sysdeps/powerpc/powerpc64/dl-machine.h
60 (elf_machine_rel, elf_machine_rel_relative): Removed.
61
622005-02-14 Alan Modra <amodra@bigpond.net.au>
63
64 * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Define
65 with auto inline, and attribute always_inline.
66 (elf_machine_rela_relative, elf_machine_lazy_rel): Likewise.
67 (elf_machine_rel, elf_machine_rel_relative): Likewise.
68 * sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela): Likewise.
69 (elf_machine_rela_relative, elf_machine_lazy_rel): Likewise.
70 (elf_machine_rel, elf_machine_rel_relative): Likewise.
71 (elf_machine_tprel): Likewise.
72
732005-02-03 Alexandre Oliva <aoliva@redhat.com>
74
75 [BZ #721]
76 * elf/dynamic-link.h: Don't declare nested auto functions that are
77 not going to be defined.
78
79===================================================================
80RCS file: /cvs/glibc/libc/elf/dynamic-link.h,v
81retrieving revision 1.51
82retrieving revision 1.54
83diff -u -r1.51 -r1.54
84--- libc/elf/dynamic-link.h 2004/09/24 17:09:03 1.51
85+++ libc/elf/dynamic-link.h 2005/03/15 22:57:25 1.54
86@@ -1,5 +1,5 @@
87 /* Inline functions for dynamic linking.
88- Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc.
89+ Copyright (C) 1995-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
90 This file is part of the GNU C Library.
91
92 The GNU C Library is free software; you can redistribute it and/or
93@@ -31,26 +31,30 @@
94 optimizing away alignment tests or using word instructions for
95 copying memory, breaking the very code written to handle the
96 unaligned cases. */
97-auto void __attribute__((always_inline))
98+# if ! ELF_MACHINE_NO_REL
99+auto inline void __attribute__((always_inline))
100 elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
101 const ElfW(Sym) *sym, const struct r_found_version *version,
102 void *const reloc_addr);
103-auto void __attribute__((always_inline))
104+auto inline void __attribute__((always_inline))
105+elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
106+ void *const reloc_addr);
107+# endif
108+# if ! ELF_MACHINE_NO_RELA
109+auto inline void __attribute__((always_inline))
110 elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
111 const ElfW(Sym) *sym, const struct r_found_version *version,
112 void *const reloc_addr);
113-auto void __attribute__((always_inline))
114-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
115- void *const reloc_addr);
116-auto void __attribute__((always_inline))
117+auto inline void __attribute__((always_inline))
118 elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
119 void *const reloc_addr);
120+# endif
121 # if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
122-auto void __attribute__((always_inline))
123+auto inline void __attribute__((always_inline))
124 elf_machine_lazy_rel (struct link_map *map,
125 ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
126 # else
127-auto void __attribute__((always_inline))
128+auto inline void __attribute__((always_inline))
129 elf_machine_lazy_rel (struct link_map *map,
130 ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
131 # endif
132===================================================================
133RCS file: /cvs/glibc/libc/sysdeps/alpha/dl-machine.h,v
134retrieving revision 1.80
135retrieving revision 1.81
136diff -u -r1.80 -r1.81
137--- libc/sysdeps/alpha/dl-machine.h 2005/02/07 03:11:46 1.80
138+++ libc/sysdeps/alpha/dl-machine.h 2005/03/15 22:57:26 1.81
139@@ -1,5 +1,5 @@
140 /* Machine-dependent ELF dynamic relocation inline functions. Alpha version.
141- Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc.
142+ Copyright (C) 1996-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
143 This file is part of the GNU C Library.
144 Contributed by Richard Henderson <rth@tamu.edu>.
145
146@@ -376,6 +376,7 @@
147 /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
148 MAP is the object containing the reloc. */
149 auto inline void
150+__attribute__ ((always_inline))
151 elf_machine_rela (struct link_map *map,
152 const Elf64_Rela *reloc,
153 const Elf64_Sym *sym,
154@@ -504,6 +505,7 @@
155 #define ELF_MACHINE_REL_RELATIVE 1
156
157 auto inline void
158+__attribute__ ((always_inline))
159 elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
160 void *const reloc_addr_arg)
161 {
162@@ -520,6 +522,7 @@
163 }
164
165 auto inline void
166+__attribute__ ((always_inline))
167 elf_machine_lazy_rel (struct link_map *map,
168 Elf64_Addr l_addr, const Elf64_Rela *reloc)
169 {
170--- glibc-2.3.4/sysdeps/arm/dl-machine.h-orig 2004-12-05 08:20:17.000000000 +1100
171+++ glibc-2.3.4/sysdeps/arm/dl-machine.h 2005-06-03 15:33:44.000000000 +1000
172@@ -350,16 +350,15 @@
173
174 #endif /* !dl_machine_h */
175
176-#ifdef RESOLVE
177-
178 /* ARM never uses Elf32_Rela relocations for the dynamic linker.
179 Prelinked libraries may use Elf32_Rela though. */
180-# ifdef RTLD_BOOTSTRAP
181-# define ELF_MACHINE_NO_RELA 1
182-# endif
183+#define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP
184+
185+#ifdef RESOLVE
186
187 /* Deal with an out-of-range PC24 reloc. */
188-static Elf32_Addr
189+auto inline Elf32_Addr
190+__attribute__ ((always_inline))
191 fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value)
192 {
193 static void *fix_page;
194@@ -392,7 +391,8 @@
195 /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
196 MAP is the object containing the reloc. */
197
198-static inline void
199+auto inline void
200+__attribute__ ((always_inline))
201 elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
202 const Elf32_Sym *sym, const struct r_found_version *version,
203 void *const reloc_addr_arg)
204@@ -517,7 +517,8 @@
205 }
206
207 # ifndef RTLD_BOOTSTRAP
208-static inline void
209+auto inline void
210+__attribute__ ((always_inline))
211 elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
212 const Elf32_Sym *sym, const struct r_found_version *version,
213 void *const reloc_addr_arg)
214@@ -597,7 +598,8 @@
215 }
216 # endif
217
218-static inline void
219+auto inline void
220+__attribute__ ((always_inline))
221 elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
222 void *const reloc_addr_arg)
223 {
224@@ -606,7 +608,8 @@
225 }
226
227 # ifndef RTLD_BOOTSTRAP
228-static inline void
229+auto inline void
230+__attribute__ ((always_inline))
231 elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
232 void *const reloc_addr_arg)
233 {
234@@ -615,7 +618,8 @@
235 }
236 # endif
237
238-static inline void
239+auto inline void
240+__attribute__ ((always_inline))
241 elf_machine_lazy_rel (struct link_map *map,
242 Elf32_Addr l_addr, const Elf32_Rel *reloc)
243 {
244===================================================================
245RCS file: /cvs/glibc/libc/sysdeps/generic/dl-machine.h,v
246retrieving revision 1.8
247retrieving revision 1.9
248diff -u -r1.8 -r1.9
249--- libc/sysdeps/generic/dl-machine.h 2001/09/08 17:16:43 1.8
250+++ libc/sysdeps/generic/dl-machine.h 2005/03/15 22:57:24 1.9
251@@ -1,5 +1,6 @@
252 /* Machine-dependent ELF dynamic relocation inline functions. Stub version.
253- Copyright (C) 1995,1996,1997,1999,2000,2001 Free Software Foundation, Inc.
254+ Copyright (C) 1995, 1996, 1997, 1999, 2000, 2001, 2005
255+ Free Software Foundation, Inc.
256 This file is part of the GNU C Library.
257
258 The GNU C Library is free software; you can redistribute it and/or
259@@ -64,7 +65,8 @@
260 LOADADDR is the load address of the object; INFO is an array indexed
261 by DT_* of the .dynamic section info. */
262
263-static inline void
264+auto inline void
265+__attribute__ ((always_inline))
266 elf_machine_rel (Elf32_Addr loadaddr, Elf32_Dyn *info[DT_NUM],
267 const Elf32_Rel *reloc, const Elf32_Sym *sym,
268 Elf32_Addr (*resolve) (const Elf32_Sym **ref,
269@@ -87,7 +89,8 @@
270 }
271
272
273-static inline Elf32_Addr
274+auto inline Elf32_Addr
275+__attribute__ ((always_inline))
276 elf_machine_rela (Elf32_Addr loadaddr, Elf32_Dyn *info[DT_NUM],
277 const Elf32_Rel *reloc, const Elf32_Sym *sym,
278 Elf32_Addr (*resolve) (const Elf32_Sym **ref,
279--- glibc-2.3.4/sysdeps/mips/dl-machine.h-orig 2004-11-24 15:36:09.000000000 +1100
280+++ glibc-2.3.4/sysdeps/mips/dl-machine.h 2005-05-05 01:39:11.000000000 +1000
281@@ -528,7 +528,7 @@
282 /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
283 MAP is the object containing the reloc. */
284
285-static inline void
286+auto inline void
287 #ifdef RTLD_BOOTSTRAP
288 __attribute__ ((always_inline))
289 #endif
290@@ -635,14 +635,16 @@
291 }
292 }
293
294-static inline void
295+auto inline void
296+__attribute__((always_inline))
297 elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
298 void *const reloc_addr)
299 {
300 /* XXX Nothing to do. There is no relative relocation, right? */
301 }
302
303-static inline void
304+auto inline void
305+__attribute__((always_inline))
306 elf_machine_lazy_rel (struct link_map *map,
307 ElfW(Addr) l_addr, const ElfW(Rel) *reloc)
308 {
309@@ -651,7 +653,8 @@
310
311 #ifndef RTLD_BOOTSTRAP
312 /* Relocate GOT. */
313-static inline void
314+auto inline void
315+__attribute__((always_inline))
316 elf_machine_got_rel (struct link_map *map, int lazy)
317 {
318 ElfW(Addr) *got;
319@@ -738,7 +741,8 @@
320 /* Set up the loaded object described by L so its stub function
321 will jump to the on-demand fixup code __dl_runtime_resolve. */
322
323-static inline int
324+auto inline int
325+__attribute__((always_inline))
326 elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
327 {
328 # ifndef RTLD_BOOTSTRAP
329===================================================================
330RCS file: /cvs/glibc/libc/sysdeps/powerpc/powerpc32/dl-machine.h,v
331retrieving revision 1.11
332retrieving revision 1.13
333diff -u -r1.11 -r1.13
334--- libc/sysdeps/powerpc/powerpc32/dl-machine.h 2005/01/25 10:42:04 1.11
335+++ libc/sysdeps/powerpc/powerpc32/dl-machine.h 2005/02/17 01:16:34 1.13
336@@ -204,7 +204,7 @@
337 LOADADDR is the load address of the object; INFO is an array indexed
338 by DT_* of the .dynamic section info. */
339
340-inline void
341+auto inline void __attribute__ ((always_inline))
342 elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
343 const Elf32_Sym *sym, const struct r_found_version *version,
344 void *const reloc_addr_arg)
345@@ -298,7 +298,7 @@
346 }
347 }
348
349-static inline void
350+auto inline void __attribute__ ((always_inline))
351 elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
352 void *const reloc_addr_arg)
353 {
354@@ -306,7 +306,7 @@
355 *reloc_addr = l_addr + reloc->r_addend;
356 }
357
358-static inline void
359+auto inline void __attribute__ ((always_inline))
360 elf_machine_lazy_rel (struct link_map *map,
361 Elf32_Addr l_addr, const Elf32_Rela *reloc)
362 {
363===================================================================
364RCS file: /cvs/glibc/libc/sysdeps/powerpc/powerpc64/dl-machine.h,v
365retrieving revision 1.21
366retrieving revision 1.23
367diff -u -r1.21 -r1.23
368--- libc/sysdeps/powerpc/powerpc64/dl-machine.h 2005/01/08 07:07:01 1.21
369+++ libc/sysdeps/powerpc/powerpc64/dl-machine.h 2005/02/17 01:16:34 1.23
370@@ -487,7 +487,7 @@
371 const Elf64_Sym *refsym)
372 attribute_hidden;
373
374-static inline void
375+auto inline void __attribute__ ((always_inline))
376 elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
377 void *const reloc_addr_arg)
378 {
379@@ -497,7 +497,7 @@
380
381 #if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD)
382 /* This computes the value used by TPREL* relocs. */
383-static Elf64_Addr __attribute__ ((const))
384+auto inline Elf64_Addr __attribute__ ((always_inline, const))
385 elf_machine_tprel (struct link_map *map,
386 struct link_map *sym_map,
387 const Elf64_Sym *sym,
388@@ -518,7 +518,7 @@
389
390 /* Perform the relocation specified by RELOC and SYM (which is fully
391 resolved). MAP is the object containing the reloc. */
392-static inline void
393+auto inline void __attribute__ ((always_inline))
394 elf_machine_rela (struct link_map *map,
395 const Elf64_Rela *reloc,
396 const Elf64_Sym *sym,
397@@ -803,11 +803,12 @@
398 MODIFIED_CODE_NOQUEUE (reloc_addr);
399 }
400
401-static inline void
402+auto inline void __attribute__ ((always_inline))
403 elf_machine_lazy_rel (struct link_map *map,
404 Elf64_Addr l_addr, const Elf64_Rela *reloc)
405 {
406 /* elf_machine_runtime_setup handles this. */
407 }
408
409+
410 #endif /* RESOLVE */
411===================================================================
412RCS file: /cvs/glibc/libc/sysdeps/sparc/sparc32/dl-machine.h,v
413retrieving revision 1.53
414retrieving revision 1.54
415diff -u -r1.53 -r1.54
416--- libc/sysdeps/sparc/sparc32/dl-machine.h 2004/05/17 18:20:30 1.53
417+++ libc/sysdeps/sparc/sparc32/dl-machine.h 2005/03/15 22:57:24 1.54
418@@ -1,5 +1,5 @@
419 /* Machine-dependent ELF dynamic relocation inline functions. SPARC version.
420- Copyright (C) 1996-2003, 2004 Free Software Foundation, Inc.
421+ Copyright (C) 1996-2003, 2004, 2005 Free Software Foundation, Inc.
422 This file is part of the GNU C Library.
423
424 The GNU C Library is free software; you can redistribute it and/or
425@@ -411,7 +411,8 @@
426 /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
427 MAP is the object containing the reloc. */
428
429-static inline void
430+auto inline void
431+__attribute__ ((always_inline))
432 elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
433 const Elf32_Sym *sym, const struct r_found_version *version,
434 void *const reloc_addr_arg)
435@@ -593,7 +594,8 @@
436 }
437 }
438
439-static inline void
440+auto inline void
441+__attribute__ ((always_inline))
442 elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
443 void *const reloc_addr_arg)
444 {
445@@ -601,7 +603,8 @@
446 *reloc_addr += l_addr + reloc->r_addend;
447 }
448
449-static inline void
450+auto inline void
451+__attribute__ ((always_inline))
452 elf_machine_lazy_rel (struct link_map *map,
453 Elf32_Addr l_addr, const Elf32_Rela *reloc)
454 {
455===================================================================
456RCS file: /cvs/glibc/libc/sysdeps/sparc/sparc64/dl-machine.h,v
457retrieving revision 1.47
458retrieving revision 1.48
459diff -u -r1.47 -r1.48
460--- libc/sysdeps/sparc/sparc64/dl-machine.h 2004/03/05 10:27:55 1.47
461+++ libc/sysdeps/sparc/sparc64/dl-machine.h 2005/03/15 22:57:26 1.48
462@@ -1,5 +1,5 @@
463 /* Machine-dependent ELF dynamic relocation inline functions. Sparc64 version.
464- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
465+ Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
466 Free Software Foundation, Inc.
467 This file is part of the GNU C Library.
468
469@@ -238,7 +238,8 @@
470 /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
471 MAP is the object containing the reloc. */
472
473-static inline void
474+auto inline void
475+__attribute__ ((always_inline))
476 elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
477 const Elf64_Sym *sym, const struct r_found_version *version,
478 void *const reloc_addr_arg)
479@@ -430,7 +431,8 @@
480 }
481 }
482
483-static inline void
484+auto inline void
485+__attribute__ ((always_inline))
486 elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
487 void *const reloc_addr_arg)
488 {
489@@ -438,7 +440,8 @@
490 *reloc_addr = l_addr + reloc->r_addend;
491 }
492
493-static inline void
494+auto inline void
495+__attribute__ ((always_inline))
496 elf_machine_lazy_rel (struct link_map *map,
497 Elf64_Addr l_addr, const Elf64_Rela *reloc)
498 {
499--- glibc-2.3.4/sysdeps/i386/dl-machine.h-orig 2004-09-28 14:54:41.000000000 +1000
500+++ glibc-2.3.4/sysdeps/i386/dl-machine.h 2005-06-02 19:28:58.000000000 +1000
501@@ -377,13 +377,11 @@
502
503 #endif /* !dl_machine_h */
504
505-#ifdef RESOLVE
506-
507 /* The i386 never uses Elf32_Rela relocations for the dynamic linker.
508 Prelinked libraries may use Elf32_Rela though. */
509-#ifdef RTLD_BOOTSTRAP
510-# define ELF_MACHINE_NO_RELA 1
511-#endif
512+#define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP
513+
514+#ifdef RESOLVE
515
516 /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
517 MAP is the object containing the reloc. */
Note: See TracBrowser for help on using the repository browser.