source: scripts/patches/glibc-2.3.4-gcc4_elf_fixes.patch@ 75bc092

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 75bc092 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
  • 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
     
    11/* 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.
    33   This file is part of the GNU C Library.
    44
    55   The GNU C Library is free software; you can redistribute it and/or
     
    3131   optimizing away alignment tests or using word instructions for
    3232   copying memory, breaking the very code written to handle the
    3333   unaligned cases.  */
    34 auto void __attribute__((always_inline))
     34# if ! ELF_MACHINE_NO_REL
     35auto inline void __attribute__((always_inline))
    3536elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
    3637                 const ElfW(Sym) *sym, const struct r_found_version *version,
    3738                 void *const reloc_addr);
    38 auto void __attribute__((always_inline))
     39auto inline void __attribute__((always_inline))
     40elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
     41                          void *const reloc_addr);
     42# endif
     43# if ! ELF_MACHINE_NO_RELA
     44auto inline void __attribute__((always_inline))
    3945elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
    4046                  const ElfW(Sym) *sym, const struct r_found_version *version,
    4147                  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))
     48auto inline void __attribute__((always_inline))
    4649elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
    4750                           void *const reloc_addr);
     51# endif
    4852# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
    49 auto void __attribute__((always_inline))
     53auto inline void __attribute__((always_inline))
    5054elf_machine_lazy_rel (struct link_map *map,
    5155                      ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
    5256# else
    53 auto void __attribute__((always_inline))
     57auto inline void __attribute__((always_inline))
    5458elf_machine_lazy_rel (struct link_map *map,
    5559                      ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
    5660# 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
     
    11/* 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.
    33   This file is part of the GNU C Library.
    44   Contributed by Richard Henderson <rth@tamu.edu>.
    55
     
    376376/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
    377377   MAP is the object containing the reloc.  */
    378378auto inline void
     379__attribute__ ((always_inline))
    379380elf_machine_rela (struct link_map *map,
    380381                  const Elf64_Rela *reloc,
    381382                  const Elf64_Sym *sym,
     
    504505#define ELF_MACHINE_REL_RELATIVE 1
    505506
    506507auto inline void
     508__attribute__ ((always_inline))
    507509elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
    508510                           void *const reloc_addr_arg)
    509511{
     
    520522}
    521523
    522524auto inline void
     525__attribute__ ((always_inline))
    523526elf_machine_lazy_rel (struct link_map *map,
    524527                      Elf64_Addr l_addr, const Elf64_Rela *reloc)
    525528{
  • glibc-2.3.4/sysdeps/arm/dl-machine.

    old new  
    350350
    351351#endif /* !dl_machine_h */
    352352
    353 #ifdef RESOLVE
    354 
    355353/* ARM never uses Elf32_Rela relocations for the dynamic linker.
    356354   Prelinked libraries may use Elf32_Rela though.  */
    357 # ifdef RTLD_BOOTSTRAP
    358 #  define ELF_MACHINE_NO_RELA 1
    359 # endif
     355#define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP
     356
     357#ifdef RESOLVE
    360358
    361359/* Deal with an out-of-range PC24 reloc.  */
    362 static Elf32_Addr
     360auto inline Elf32_Addr
     361__attribute__ ((always_inline))
    363362fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value)
    364363{
    365364  static void *fix_page;
     
    392391/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
    393392   MAP is the object containing the reloc.  */
    394393
    395 static inline void
     394auto inline void
     395__attribute__ ((always_inline))
    396396elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
    397397                 const Elf32_Sym *sym, const struct r_found_version *version,
    398398                 void *const reloc_addr_arg)
     
    517517}
    518518
    519519# ifndef RTLD_BOOTSTRAP
    520 static inline void
     520auto inline void
     521__attribute__ ((always_inline))
    521522elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
    522523                  const Elf32_Sym *sym, const struct r_found_version *version,
    523524                  void *const reloc_addr_arg)
     
    597598}
    598599# endif
    599600
    600 static inline void
     601auto inline void
     602__attribute__ ((always_inline))
    601603elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
    602604                          void *const reloc_addr_arg)
    603605{
     
    606608}
    607609
    608610# ifndef RTLD_BOOTSTRAP
    609 static inline void
     611auto inline void
     612__attribute__ ((always_inline))
    610613elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
    611614                           void *const reloc_addr_arg)
    612615{
     
    615618}
    616619# endif
    617620
    618 static inline void
     621auto inline void
     622__attribute__ ((always_inline))
    619623elf_machine_lazy_rel (struct link_map *map,
    620624                      Elf32_Addr l_addr, const Elf32_Rel *reloc)
    621625{
  • 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
     
    11/* 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.
    34   This file is part of the GNU C Library.
    45
    56   The GNU C Library is free software; you can redistribute it and/or
     
    6465   LOADADDR is the load address of the object; INFO is an array indexed
    6566   by DT_* of the .dynamic section info.  */
    6667
    67 static inline void
     68auto inline void
     69__attribute__ ((always_inline))
    6870elf_machine_rel (Elf32_Addr loadaddr, Elf32_Dyn *info[DT_NUM],
    6971                 const Elf32_Rel *reloc, const Elf32_Sym *sym,
    7072                 Elf32_Addr (*resolve) (const Elf32_Sym **ref,
     
    8789}
    8890
    8991
    90 static inline Elf32_Addr
     92auto inline Elf32_Addr
     93__attribute__ ((always_inline))
    9194elf_machine_rela (Elf32_Addr loadaddr, Elf32_Dyn *info[DT_NUM],
    9295                  const Elf32_Rel *reloc, const Elf32_Sym *sym,
    9396                  Elf32_Addr (*resolve) (const Elf32_Sym **ref,
  • glibc-2.3.4/sysdeps/mips/dl-machine.

    old new  
    528528/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
    529529   MAP is the object containing the reloc.  */
    530530
    531 static inline void
     531auto inline void
    532532#ifdef RTLD_BOOTSTRAP
    533533  __attribute__ ((always_inline))
    534534#endif
     
    635635    }
    636636}
    637637
    638 static inline void
     638auto inline void
     639__attribute__((always_inline))
    639640elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
    640641                          void *const reloc_addr)
    641642{
    642643  /* XXX Nothing to do.  There is no relative relocation, right?  */
    643644}
    644645
    645 static inline void
     646auto inline void
     647__attribute__((always_inline))
    646648elf_machine_lazy_rel (struct link_map *map,
    647649                      ElfW(Addr) l_addr, const ElfW(Rel) *reloc)
    648650{
     
    651653
    652654#ifndef RTLD_BOOTSTRAP
    653655/* Relocate GOT. */
    654 static inline void
     656auto inline void
     657__attribute__((always_inline))
    655658elf_machine_got_rel (struct link_map *map, int lazy)
    656659{
    657660  ElfW(Addr) *got;
     
    738741/* Set up the loaded object described by L so its stub function
    739742   will jump to the on-demand fixup code __dl_runtime_resolve.  */
    740743
    741 static inline int
     744auto inline int
     745__attribute__((always_inline))
    742746elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
    743747{
    744748# 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
     
    204204   LOADADDR is the load address of the object; INFO is an array indexed
    205205   by DT_* of the .dynamic section info.  */
    206206
    207 inline void
     207auto inline void __attribute__ ((always_inline))
    208208elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
    209209                  const Elf32_Sym *sym, const struct r_found_version *version,
    210210                  void *const reloc_addr_arg)
     
    298298    }
    299299}
    300300
    301 static inline void
     301auto inline void __attribute__ ((always_inline))
    302302elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
    303303                           void *const reloc_addr_arg)
    304304{
     
    306306  *reloc_addr = l_addr + reloc->r_addend;
    307307}
    308308
    309 static inline void
     309auto inline void __attribute__ ((always_inline))
    310310elf_machine_lazy_rel (struct link_map *map,
    311311                      Elf32_Addr l_addr, const Elf32_Rela *reloc)
    312312{
  • 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
     
    487487                                const Elf64_Sym *refsym)
    488488                                attribute_hidden;
    489489
    490 static inline void
     490auto inline void __attribute__ ((always_inline))
    491491elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
    492492                           void *const reloc_addr_arg)
    493493{
     
    497497
    498498#if defined USE_TLS && (!defined RTLD_BOOTSTRAP || USE___THREAD)
    499499/* This computes the value used by TPREL* relocs.  */
    500 static Elf64_Addr __attribute__ ((const))
     500auto inline Elf64_Addr __attribute__ ((always_inline, const))
    501501elf_machine_tprel (struct link_map *map,
    502502                   struct link_map *sym_map,
    503503                   const Elf64_Sym *sym,
     
    518518
    519519/* Perform the relocation specified by RELOC and SYM (which is fully
    520520   resolved).  MAP is the object containing the reloc.  */
    521 static inline void
     521auto inline void __attribute__ ((always_inline))
    522522elf_machine_rela (struct link_map *map,
    523523                  const Elf64_Rela *reloc,
    524524                  const Elf64_Sym *sym,
     
    803803  MODIFIED_CODE_NOQUEUE (reloc_addr);
    804804}
    805805
    806 static inline void
     806auto inline void __attribute__ ((always_inline))
    807807elf_machine_lazy_rel (struct link_map *map,
    808808                      Elf64_Addr l_addr, const Elf64_Rela *reloc)
    809809{
    810810  /* elf_machine_runtime_setup handles this.  */
    811811}
    812812
     813
    813814#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
     
    11/* 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.
    33   This file is part of the GNU C Library.
    44
    55   The GNU C Library is free software; you can redistribute it and/or
     
    411411/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
    412412   MAP is the object containing the reloc.  */
    413413
    414 static inline void
     414auto inline void
     415__attribute__ ((always_inline))
    415416elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
    416417                  const Elf32_Sym *sym, const struct r_found_version *version,
    417418                  void *const reloc_addr_arg)
     
    593594    }
    594595}
    595596
    596 static inline void
     597auto inline void
     598__attribute__ ((always_inline))
    597599elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
    598600                           void *const reloc_addr_arg)
    599601{
     
    601603  *reloc_addr += l_addr + reloc->r_addend;
    602604}
    603605
    604 static inline void
     606auto inline void
     607__attribute__ ((always_inline))
    605608elf_machine_lazy_rel (struct link_map *map,
    606609                      Elf32_Addr l_addr, const Elf32_Rela *reloc)
    607610{
  • 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
     
    11/* 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
    33        Free Software Foundation, Inc.
    44   This file is part of the GNU C Library.
    55
     
    238238/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
    239239   MAP is the object containing the reloc.  */
    240240
    241 static inline void
     241auto inline void
     242__attribute__ ((always_inline))
    242243elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
    243244                  const Elf64_Sym *sym, const struct r_found_version *version,
    244245                  void *const reloc_addr_arg)
     
    430431    }
    431432}
    432433
    433 static inline void
     434auto inline void
     435__attribute__ ((always_inline))
    434436elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
    435437                           void *const reloc_addr_arg)
    436438{
     
    438440  *reloc_addr = l_addr + reloc->r_addend;
    439441}
    440442
    441 static inline void
     443auto inline void
     444__attribute__ ((always_inline))
    442445elf_machine_lazy_rel (struct link_map *map,
    443446                      Elf64_Addr l_addr, const Elf64_Rela *reloc)
    444447{
  • glibc-2.3.4/sysdeps/i386/dl-machine.

    old new  
    377377
    378378#endif /* !dl_machine_h */
    379379
    380 #ifdef RESOLVE
    381 
    382380/* The i386 never uses Elf32_Rela relocations for the dynamic linker.
    383381   Prelinked libraries may use Elf32_Rela though.  */
    384 #ifdef RTLD_BOOTSTRAP
    385 # define ELF_MACHINE_NO_RELA 1
    386 #endif
     382#define ELF_MACHINE_NO_RELA defined RTLD_BOOTSTRAP
     383
     384#ifdef RESOLVE
    387385
    388386/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
    389387   MAP is the object containing the reloc.  */
Note: See TracBrowser for help on using the repository browser.