patches/glibc/2.3.2/fixup.patch
changeset 330 447b203edc2e
parent 329 419d959441ed
child 331 0c05f9ea3254
     1.1 --- a/patches/glibc/2.3.2/fixup.patch	Tue Aug 14 19:32:22 2007 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,74 +0,0 @@
     1.4 -Fixes
     1.5 -dl-runtime.c:56: error: conflicting types for 'fixup'
     1.6 -../sysdeps/i386/dl-machine.h:158: error: previous declaration of 'fixup' was here
     1.7 -when building with gcc-3.4.0
     1.8 -
     1.9 -First hunk:
    1.10 -Define ARCH_FIXUP_ATTRIBUTE and use it in the fixup function declarations.
    1.11 -http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/dl-machine.h.diff?r1=1.124&r2=1.125&cvsroot=glibc
    1.12 -
    1.13 -Second hunk:
    1.14 -If ARCH_FIXUP_ATTRIBUTE is not defined, provide dummy definition.
    1.15 -Use macro in fixup function definitions.
    1.16 -http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/elf/dl-runtime.c.diff?r1=1.64&r2=1.65&cvsroot=glibc
    1.17 -[rediffed against glibc-2.3.2]
    1.18 -
    1.19 -===================================================================
    1.20 -RCS file: /cvs/glibc/libc/sysdeps/i386/dl-machine.h,v
    1.21 -retrieving revision 1.124
    1.22 -retrieving revision 1.125
    1.23 -diff -u -r1.124 -r1.125
    1.24 ---- libc/sysdeps/i386/dl-machine.h	2004/03/05 10:14:49	1.124
    1.25 -+++ libc/sysdeps/i386/dl-machine.h	2004/03/09 07:42:29	1.125
    1.26 -@@ -154,11 +154,14 @@
    1.27 -    destroys the passed register information.  */
    1.28 - /* GKM FIXME: Fix trampoline to pass bounds so we can do
    1.29 -    without the `__unbounded' qualifier.  */
    1.30 --static ElfW(Addr) fixup (struct link_map *__unbounded l, ElfW(Word) reloc_offset)
    1.31 --     __attribute__ ((regparm (2), unused));
    1.32 -+#define ARCH_FIXUP_ATTRIBUTE __attribute__ ((regparm (3), unused))
    1.33 -+
    1.34 -+static ElfW(Addr) fixup (struct link_map *__unbounded l,
    1.35 -+			 ElfW(Word) reloc_offset)
    1.36 -+     ARCH_FIXUP_ATTRIBUTE;
    1.37 - static ElfW(Addr) profile_fixup (struct link_map *l, ElfW(Word) reloc_offset,
    1.38 - 				 ElfW(Addr) retaddr)
    1.39 --     __attribute__ ((regparm (3), unused));
    1.40 -+     ARCH_FIXUP_ATTRIBUTE;
    1.41 - # endif
    1.42 - 
    1.43 - /* This code is used in dl-runtime.c to call the `fixup' function
    1.44 -===================================================================
    1.45 ---- /home/dank/downloads/glibc-2.3.2/elf/dl-runtime.c	Fri Feb  7 11:41:12 2003
    1.46 -+++ glibc-2.3.2/elf/dl-runtime.c	Thu Apr  8 22:24:26 2004
    1.47 -@@ -36,6 +36,12 @@
    1.48 - # define VERSYMIDX(sym)	(DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
    1.49 - #endif
    1.50 - 
    1.51 -+/* The fixup functions might have need special attributes.  If none
    1.52 -+   are provided define the macro as empty.  */
    1.53 -+#ifndef ARCH_FIXUP_ATTRIBUTE
    1.54 -+# define ARCH_FIXUP_ATTRIBUTE
    1.55 -+#endif
    1.56 -+
    1.57 - 
    1.58 - /* This function is called through a special trampoline from the PLT the
    1.59 -    first time each PLT entry is called.  We must perform the relocation
    1.60 -@@ -45,7 +51,7 @@
    1.61 -    function.  */
    1.62 - 
    1.63 - #ifndef ELF_MACHINE_NO_PLT
    1.64 --static ElfW(Addr) __attribute_used__
    1.65 -+static ElfW(Addr) __attribute_used__ ARCH_FIXUP_ATTRIBUTE
    1.66 - fixup (
    1.67 - # ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
    1.68 -         ELF_MACHINE_RUNTIME_FIXUP_ARGS,
    1.69 -@@ -132,7 +138,7 @@
    1.70 - 
    1.71 - #if !defined PROF && !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__
    1.72 - 
    1.73 --static ElfW(Addr) __attribute_used__
    1.74 -+static ElfW(Addr) __attribute_used__ ARCH_FIXUP_ATTRIBUTE
    1.75 - profile_fixup (
    1.76 - #ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
    1.77 -        ELF_MACHINE_RUNTIME_FIXUP_ARGS,