patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-3.4-fixup.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
     1 Fixes
     2 dl-runtime.c:56: error: conflicting types for 'fixup'
     3 ../sysdeps/i386/dl-machine.h:158: error: previous declaration of 'fixup' was here
     4 when building with gcc-3.4.0
     5 
     6 First hunk:
     7 Define ARCH_FIXUP_ATTRIBUTE and use it in the fixup function declarations.
     8 http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/dl-machine.h.diff?r1=1.124&r2=1.125&cvsroot=glibc
     9 [rediffed against glibc-2.2.5]
    10 
    11 Second hunk:
    12 If ARCH_FIXUP_ATTRIBUTE is not defined, provide dummy definition.
    13 Use macro in fixup function definitions.
    14 http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/elf/dl-runtime.c.diff?r1=1.64&r2=1.65&cvsroot=glibc
    15 [rediffed against glibc-2.3.2]
    16 
    17 ===================================================================
    18 --- glibc-2.2.5/sysdeps/i386/dl-machine.h.old	Sun Apr 11 11:53:23 2004
    19 +++ glibc-2.2.5/sysdeps/i386/dl-machine.h	Sun Apr 11 11:55:38 2004
    20 @@ -63,11 +63,12 @@
    21     destroys the passed register information.  */
    22  /* GKM FIXME: Fix trampoline to pass bounds so we can do
    23     without the `__unbounded' qualifier.  */
    24 +#define ARCH_FIXUP_ATTRIBUTE __attribute__ ((regparm (3), unused))
    25  static ElfW(Addr) fixup (struct link_map *__unbounded l, ElfW(Word) reloc_offset)
    26 -     __attribute__ ((regparm (2), unused));
    27 +     ARCH_FIXUP_ATTRIBUTE;
    28  static ElfW(Addr) profile_fixup (struct link_map *l, ElfW(Word) reloc_offset,
    29  				 ElfW(Addr) retaddr)
    30 -     __attribute__ ((regparm (3), unused));
    31 +     ARCH_FIXUP_ATTRIBUTE;
    32  #endif
    33  
    34  /* Set up the loaded object described by L so its unrelocated PLT
    35 ===================================================================
    36 --- /home/dank/downloads/glibc-2.3.2/elf/dl-runtime.c	Fri Feb  7 11:41:12 2003
    37 +++ glibc-2.3.2/elf/dl-runtime.c	Thu Apr  8 22:24:26 2004
    38 @@ -36,6 +36,12 @@
    39  # define VERSYMIDX(sym)	(DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
    40  #endif
    41  
    42 +/* The fixup functions might have need special attributes.  If none
    43 +   are provided define the macro as empty.  */
    44 +#ifndef ARCH_FIXUP_ATTRIBUTE
    45 +# define ARCH_FIXUP_ATTRIBUTE
    46 +#endif
    47 +
    48  
    49  /* This function is called through a special trampoline from the PLT the
    50     first time each PLT entry is called.  We must perform the relocation
    51 @@ -45,7 +51,7 @@
    52     function.  */
    53  
    54  #ifndef ELF_MACHINE_NO_PLT
    55 -static ElfW(Addr) __attribute_used__
    56 +static ElfW(Addr) __attribute_used__ ARCH_FIXUP_ATTRIBUTE
    57  fixup (
    58  # ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
    59          ELF_MACHINE_RUNTIME_FIXUP_ARGS,
    60 @@ -132,7 +138,7 @@
    61  
    62  #if !defined PROF && !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__
    63  
    64 -static ElfW(Addr) __attribute_used__
    65 +static ElfW(Addr) __attribute_used__ ARCH_FIXUP_ATTRIBUTE
    66  profile_fixup (
    67  #ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
    68         ELF_MACHINE_RUNTIME_FIXUP_ARGS,