source:
scripts/patches/glibc-2.3.4-gcc4_elf_fixes.patch@
e0507947
Last change on this file since e0507947 was 7f65c0e, checked in by , 19 years ago | |
---|---|
|
|
File size: 17.8 KB |
-
libc/elf/dynamic-link.h
Submitted By: Ryan Oliver <ryan.oliver@pha.com.au> Date: 2005-05-03 (updated 2005-06-03) Initial Package Version: 2.3.4 Origin: glibc cvs libc/elf/dynamic-link.h -r1.54 libc/sysdeps/alpha/dl-machine.h -r1.81 libc/sysdeps/arm/dl-machine.h - fix_bad_pc24 fix from Dan Kegel's crosstool - remainder from -r1.52 libc/sysdeps/generic/dl-machine.h -r1.9 libc/sysdeps/mips/dl-machine.h -r1.77 - fixes cherry picked from this version libc/sysdeps/powepc/powerpc32/dl-machine.h -r1.13 libc/sysdeps/powepc/powerpc64/dl-machine.h -r1.23 libc/sysdeps/sparc/sparc64/dl-machine.h -r1.48 libc/sysdeps/i386/dl-machine.h -r1.134 (except using RESOLVE) Upstream Status: See Origin, all except fix_bad_pc24 fixed in glibc cvs Description: 2005-03-15 Jakub Jelinek <jakub@redhat.com> * elf/dynamic-link.h (elf_machine_rel, elf_machine_rel_relative, elf_machine_rela, elf_machine_rela_relative, elf_machine_lazy_rel): Add inline keyword. * sysdeps/alpha/dl-machine.h (elf_machine_rela, elf_machine_rela_relative, elf_machine_lazy_rel): Add always_inline attribute. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela, elf_machine_rela_relative, elf_machine_lazy_rel): Likewise. Change static inline into auto inline. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela, elf_machine_rela_relative, elf_machine_lazy_rel): Likewise. * sysdeps/generic/dl-machine.h (elf_machine_rel, elf_machine_rela): Likewise. * sysdeps/arm/dl-machine.h (elf_machine_rel, elf_machine_rel_relative, elf_machine_rela, elf_machine_rela_relative, elf_machine_lazy_rel): Likewise. 2005-03-05 Jakub Jelinek <jakub@redhat.com> * sysdeps/i386/dl-machine.h (ELF_MACHINE_NO_RELA): Define unconditionally to (defined RTLD_BOOTSTRAP). * sysdeps/arm/dl-machine.h (ELF_MACHINE_NO_RELA): Likewise 2005-03-01 Roland McGrath <roland@redhat.com> [BZ #721] * sysdeps/arm/dl-machine.h (ELF_MACHINE_NO_RELA): Define this outside of [RESOLVE_MAP] 2005-02-16 Roland McGrath <roland@redhat.com> [BZ #721] * sysdeps/i386/dl-machine.h (ELF_MACHINE_NO_RELA): Define this outside of [RESOLVE_MAP]. * sysdeps/sh/dl-machine.h (ELF_MACHINE_NO_REL): Likewise. * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rel, elf_machine_rel_relative): Removed. * sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rel, elf_machine_rel_relative): Removed. 2005-02-14 Alan Modra <amodra@bigpond.net.au> * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Define with auto inline, and attribute always_inline. (elf_machine_rela_relative, elf_machine_lazy_rel): Likewise. (elf_machine_rel, elf_machine_rel_relative): Likewise. * sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela): Likewise. (elf_machine_rela_relative, elf_machine_lazy_rel): Likewise. (elf_machine_rel, elf_machine_rel_relative): Likewise. (elf_machine_tprel): Likewise. 2005-02-03 Alexandre Oliva <aoliva@redhat.com> [BZ #721] * elf/dynamic-link.h: Don't declare nested auto functions that are not going to be defined. RCS file: /cvs/glibc/libc/elf/dynamic-link.h,v retrieving revision 1.51 retrieving revision 1.54 diff -u -r1.51 -r1.54
1 1 /* Inline functions for dynamic linking. 2 Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc.2 Copyright (C) 1995-2002, 2003, 2004, 2005 Free Software Foundation, Inc. 3 3 This file is part of the GNU C Library. 4 4 5 5 The GNU C Library is free software; you can redistribute it and/or … … 31 31 optimizing away alignment tests or using word instructions for 32 32 copying memory, breaking the very code written to handle the 33 33 unaligned cases. */ 34 auto void __attribute__((always_inline)) 34 # if ! ELF_MACHINE_NO_REL 35 auto inline void __attribute__((always_inline)) 35 36 elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, 36 37 const ElfW(Sym) *sym, const struct r_found_version *version, 37 38 void *const reloc_addr); 38 auto void __attribute__((always_inline)) 39 auto inline void __attribute__((always_inline)) 40 elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, 41 void *const reloc_addr); 42 # endif 43 # if ! ELF_MACHINE_NO_RELA 44 auto inline void __attribute__((always_inline)) 39 45 elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, 40 46 const ElfW(Sym) *sym, const struct r_found_version *version, 41 47 void *const reloc_addr); 42 auto void __attribute__((always_inline)) 43 elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, 44 void *const reloc_addr); 45 auto void __attribute__((always_inline)) 48 auto inline void __attribute__((always_inline)) 46 49 elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc, 47 50 void *const reloc_addr); 51 # endif 48 52 # if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL 49 auto void __attribute__((always_inline))53 auto inline void __attribute__((always_inline)) 50 54 elf_machine_lazy_rel (struct link_map *map, 51 55 ElfW(Addr) l_addr, const ElfW(Rel) *reloc); 52 56 # else 53 auto void __attribute__((always_inline))57 auto inline void __attribute__((always_inline)) 54 58 elf_machine_lazy_rel (struct link_map *map, 55 59 ElfW(Addr) l_addr, const ElfW(Rela) *reloc); 56 60 # endif -
libc/sysdeps/alpha/dl-machine.h
RCS file: /cvs/glibc/libc/sysdeps/alpha/dl-machine.h,v retrieving revision 1.80 retrieving revision 1.81 diff -u -r1.80 -r1.81
1 1 /* Machine-dependent ELF dynamic relocation inline functions. Alpha version. 2 Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc.2 Copyright (C) 1996-2002, 2003, 2004, 2005 Free Software Foundation, Inc. 3 3 This file is part of the GNU C Library. 4 4 Contributed by Richard Henderson <rth@tamu.edu>. 5 5 … … 376 376 /* Perform the relocation specified by RELOC and SYM (which is fully resolved). 377 377 MAP is the object containing the reloc. */ 378 378 auto inline void 379 __attribute__ ((always_inline)) 379 380 elf_machine_rela (struct link_map *map, 380 381 const Elf64_Rela *reloc, 381 382 const Elf64_Sym *sym, … … 504 505 #define ELF_MACHINE_REL_RELATIVE 1 505 506 506 507 auto inline void 508 __attribute__ ((always_inline)) 507 509 elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, 508 510 void *const reloc_addr_arg) 509 511 { … … 520 522 } 521 523 522 524 auto inline void 525 __attribute__ ((always_inline)) 523 526 elf_machine_lazy_rel (struct link_map *map, 524 527 Elf64_Addr l_addr, const Elf64_Rela *reloc) 525 528 { -
glibc-2.3.4/sysdeps/arm/dl-machine.
old new 350 350 351 351 #endif /* !dl_machine_h */ 352 352 353 #ifdef RESOLVE354 355 353 /* ARM never uses Elf32_Rela relocations for the dynamic linker. 356 354 Prelinked libraries may use Elf32_Rela though. */ 357 # ifdefRTLD_BOOTSTRAP358 # define ELF_MACHINE_NO_RELA 1 359 # endif355 #define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP 356 357 #ifdef RESOLVE 360 358 361 359 /* Deal with an out-of-range PC24 reloc. */ 362 static Elf32_Addr 360 auto inline Elf32_Addr 361 __attribute__ ((always_inline)) 363 362 fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value) 364 363 { 365 364 static void *fix_page; … … 392 391 /* Perform the relocation specified by RELOC and SYM (which is fully resolved). 393 392 MAP is the object containing the reloc. */ 394 393 395 static inline void 394 auto inline void 395 __attribute__ ((always_inline)) 396 396 elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, 397 397 const Elf32_Sym *sym, const struct r_found_version *version, 398 398 void *const reloc_addr_arg) … … 517 517 } 518 518 519 519 # ifndef RTLD_BOOTSTRAP 520 static inline void 520 auto inline void 521 __attribute__ ((always_inline)) 521 522 elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, 522 523 const Elf32_Sym *sym, const struct r_found_version *version, 523 524 void *const reloc_addr_arg) … … 597 598 } 598 599 # endif 599 600 600 static inline void 601 auto inline void 602 __attribute__ ((always_inline)) 601 603 elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc, 602 604 void *const reloc_addr_arg) 603 605 { … … 606 608 } 607 609 608 610 # ifndef RTLD_BOOTSTRAP 609 static inline void 611 auto inline void 612 __attribute__ ((always_inline)) 610 613 elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, 611 614 void *const reloc_addr_arg) 612 615 { … … 615 618 } 616 619 # endif 617 620 618 static inline void 621 auto inline void 622 __attribute__ ((always_inline)) 619 623 elf_machine_lazy_rel (struct link_map *map, 620 624 Elf32_Addr l_addr, const Elf32_Rel *reloc) 621 625 { -
libc/sysdeps/generic/dl-machine.h
RCS file: /cvs/glibc/libc/sysdeps/generic/dl-machine.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9
1 1 /* Machine-dependent ELF dynamic relocation inline functions. Stub version. 2 Copyright (C) 1995,1996,1997,1999,2000,2001 Free Software Foundation, Inc. 2 Copyright (C) 1995, 1996, 1997, 1999, 2000, 2001, 2005 3 Free Software Foundation, Inc. 3 4 This file is part of the GNU C Library. 4 5 5 6 The GNU C Library is free software; you can redistribute it and/or … … 64 65 LOADADDR is the load address of the object; INFO is an array indexed 65 66 by DT_* of the .dynamic section info. */ 66 67 67 static inline void 68 auto inline void 69 __attribute__ ((always_inline)) 68 70 elf_machine_rel (Elf32_Addr loadaddr, Elf32_Dyn *info[DT_NUM], 69 71 const Elf32_Rel *reloc, const Elf32_Sym *sym, 70 72 Elf32_Addr (*resolve) (const Elf32_Sym **ref, … … 87 89 } 88 90 89 91 90 static inline Elf32_Addr 92 auto inline Elf32_Addr 93 __attribute__ ((always_inline)) 91 94 elf_machine_rela (Elf32_Addr loadaddr, Elf32_Dyn *info[DT_NUM], 92 95 const Elf32_Rel *reloc, const Elf32_Sym *sym, 93 96 Elf32_Addr (*resolve) (const Elf32_Sym **ref, -
glibc-2.3.4/sysdeps/mips/dl-machine.
old new 528 528 /* Perform the relocation specified by RELOC and SYM (which is fully resolved). 529 529 MAP is the object containing the reloc. */ 530 530 531 staticinline void531 auto inline void 532 532 #ifdef RTLD_BOOTSTRAP 533 533 __attribute__ ((always_inline)) 534 534 #endif … … 635 635 } 636 636 } 637 637 638 static inline void 638 auto inline void 639 __attribute__((always_inline)) 639 640 elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, 640 641 void *const reloc_addr) 641 642 { 642 643 /* XXX Nothing to do. There is no relative relocation, right? */ 643 644 } 644 645 645 static inline void 646 auto inline void 647 __attribute__((always_inline)) 646 648 elf_machine_lazy_rel (struct link_map *map, 647 649 ElfW(Addr) l_addr, const ElfW(Rel) *reloc) 648 650 { … … 651 653 652 654 #ifndef RTLD_BOOTSTRAP 653 655 /* Relocate GOT. */ 654 static inline void 656 auto inline void 657 __attribute__((always_inline)) 655 658 elf_machine_got_rel (struct link_map *map, int lazy) 656 659 { 657 660 ElfW(Addr) *got; … … 738 741 /* Set up the loaded object described by L so its stub function 739 742 will jump to the on-demand fixup code __dl_runtime_resolve. */ 740 743 741 static inline int 744 auto inline int 745 __attribute__((always_inline)) 742 746 elf_machine_runtime_setup (struct link_map *l, int lazy, int profile) 743 747 { 744 748 # ifndef RTLD_BOOTSTRAP -
libc/sysdeps/powerpc/powerpc32/dl-machine.h
RCS file: /cvs/glibc/libc/sysdeps/powerpc/powerpc32/dl-machine.h,v retrieving revision 1.11 retrieving revision 1.13 diff -u -r1.11 -r1.13
204 204 LOADADDR is the load address of the object; INFO is an array indexed 205 205 by DT_* of the .dynamic section info. */ 206 206 207 inline void 207 auto inline void __attribute__ ((always_inline)) 208 208 elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, 209 209 const Elf32_Sym *sym, const struct r_found_version *version, 210 210 void *const reloc_addr_arg) … … 298 298 } 299 299 } 300 300 301 static inline void 301 auto inline void __attribute__ ((always_inline)) 302 302 elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, 303 303 void *const reloc_addr_arg) 304 304 { … … 306 306 *reloc_addr = l_addr + reloc->r_addend; 307 307 } 308 308 309 static inline void 309 auto inline void __attribute__ ((always_inline)) 310 310 elf_machine_lazy_rel (struct link_map *map, 311 311 Elf32_Addr l_addr, const Elf32_Rela *reloc) 312 312 { -
libc/sysdeps/powerpc/powerpc64/dl-machine.h
RCS file: /cvs/glibc/libc/sysdeps/powerpc/powerpc64/dl-machine.h,v retrieving revision 1.21 retrieving revision 1.23 diff -u -r1.21 -r1.23
487 487 const Elf64_Sym *refsym) 488 488 attribute_hidden; 489 489 490 static inline void 490 auto inline void __attribute__ ((always_inline)) 491 491 elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, 492 492 void *const reloc_addr_arg) 493 493 { … … 497 497 498 498 #if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD) 499 499 /* This computes the value used by TPREL* relocs. */ 500 static Elf64_Addr __attribute__ ((const))500 auto inline Elf64_Addr __attribute__ ((always_inline, const)) 501 501 elf_machine_tprel (struct link_map *map, 502 502 struct link_map *sym_map, 503 503 const Elf64_Sym *sym, … … 518 518 519 519 /* Perform the relocation specified by RELOC and SYM (which is fully 520 520 resolved). MAP is the object containing the reloc. */ 521 static inline void 521 auto inline void __attribute__ ((always_inline)) 522 522 elf_machine_rela (struct link_map *map, 523 523 const Elf64_Rela *reloc, 524 524 const Elf64_Sym *sym, … … 803 803 MODIFIED_CODE_NOQUEUE (reloc_addr); 804 804 } 805 805 806 static inline void 806 auto inline void __attribute__ ((always_inline)) 807 807 elf_machine_lazy_rel (struct link_map *map, 808 808 Elf64_Addr l_addr, const Elf64_Rela *reloc) 809 809 { 810 810 /* elf_machine_runtime_setup handles this. */ 811 811 } 812 812 813 813 814 #endif /* RESOLVE */ -
libc/sysdeps/sparc/sparc32/dl-machine.h
RCS file: /cvs/glibc/libc/sysdeps/sparc/sparc32/dl-machine.h,v retrieving revision 1.53 retrieving revision 1.54 diff -u -r1.53 -r1.54
1 1 /* Machine-dependent ELF dynamic relocation inline functions. SPARC version. 2 Copyright (C) 1996-2003, 2004 Free Software Foundation, Inc.2 Copyright (C) 1996-2003, 2004, 2005 Free Software Foundation, Inc. 3 3 This file is part of the GNU C Library. 4 4 5 5 The GNU C Library is free software; you can redistribute it and/or … … 411 411 /* Perform the relocation specified by RELOC and SYM (which is fully resolved). 412 412 MAP is the object containing the reloc. */ 413 413 414 static inline void 414 auto inline void 415 __attribute__ ((always_inline)) 415 416 elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, 416 417 const Elf32_Sym *sym, const struct r_found_version *version, 417 418 void *const reloc_addr_arg) … … 593 594 } 594 595 } 595 596 596 static inline void 597 auto inline void 598 __attribute__ ((always_inline)) 597 599 elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc, 598 600 void *const reloc_addr_arg) 599 601 { … … 601 603 *reloc_addr += l_addr + reloc->r_addend; 602 604 } 603 605 604 static inline void 606 auto inline void 607 __attribute__ ((always_inline)) 605 608 elf_machine_lazy_rel (struct link_map *map, 606 609 Elf32_Addr l_addr, const Elf32_Rela *reloc) 607 610 { -
libc/sysdeps/sparc/sparc64/dl-machine.h
RCS file: /cvs/glibc/libc/sysdeps/sparc/sparc64/dl-machine.h,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48
1 1 /* Machine-dependent ELF dynamic relocation inline functions. Sparc64 version. 2 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 2 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 3 3 Free Software Foundation, Inc. 4 4 This file is part of the GNU C Library. 5 5 … … 238 238 /* Perform the relocation specified by RELOC and SYM (which is fully resolved). 239 239 MAP is the object containing the reloc. */ 240 240 241 static inline void 241 auto inline void 242 __attribute__ ((always_inline)) 242 243 elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, 243 244 const Elf64_Sym *sym, const struct r_found_version *version, 244 245 void *const reloc_addr_arg) … … 430 431 } 431 432 } 432 433 433 static inline void 434 auto inline void 435 __attribute__ ((always_inline)) 434 436 elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc, 435 437 void *const reloc_addr_arg) 436 438 { … … 438 440 *reloc_addr = l_addr + reloc->r_addend; 439 441 } 440 442 441 static inline void 443 auto inline void 444 __attribute__ ((always_inline)) 442 445 elf_machine_lazy_rel (struct link_map *map, 443 446 Elf64_Addr l_addr, const Elf64_Rela *reloc) 444 447 { -
glibc-2.3.4/sysdeps/i386/dl-machine.
old new 377 377 378 378 #endif /* !dl_machine_h */ 379 379 380 #ifdef RESOLVE381 382 380 /* The i386 never uses Elf32_Rela relocations for the dynamic linker. 383 381 Prelinked libraries may use Elf32_Rela though. */ 384 # ifdefRTLD_BOOTSTRAP385 # define ELF_MACHINE_NO_RELA 1 386 # endif382 #define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP 383 384 #ifdef RESOLVE 387 385 388 386 /* Perform the relocation specified by RELOC and SYM (which is fully resolved). 389 387 MAP is the object containing the reloc. */
Note:
See TracBrowser
for help on using the repository browser.