1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-3.4-fixup.patch Sat Jul 07 09:58:14 2007 +0000
1.3 @@ -0,0 +1,68 @@
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 +[rediffed against glibc-2.2.5]
1.13 +
1.14 +Second hunk:
1.15 +If ARCH_FIXUP_ATTRIBUTE is not defined, provide dummy definition.
1.16 +Use macro in fixup function definitions.
1.17 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/elf/dl-runtime.c.diff?r1=1.64&r2=1.65&cvsroot=glibc
1.18 +[rediffed against glibc-2.3.2]
1.19 +
1.20 +===================================================================
1.21 +--- glibc-2.2.5/sysdeps/i386/dl-machine.h.old Sun Apr 11 11:53:23 2004
1.22 ++++ glibc-2.2.5/sysdeps/i386/dl-machine.h Sun Apr 11 11:55:38 2004
1.23 +@@ -63,11 +63,12 @@
1.24 + destroys the passed register information. */
1.25 + /* GKM FIXME: Fix trampoline to pass bounds so we can do
1.26 + without the `__unbounded' qualifier. */
1.27 ++#define ARCH_FIXUP_ATTRIBUTE __attribute__ ((regparm (3), unused))
1.28 + static ElfW(Addr) fixup (struct link_map *__unbounded l, ElfW(Word) reloc_offset)
1.29 +- __attribute__ ((regparm (2), unused));
1.30 ++ ARCH_FIXUP_ATTRIBUTE;
1.31 + static ElfW(Addr) profile_fixup (struct link_map *l, ElfW(Word) reloc_offset,
1.32 + ElfW(Addr) retaddr)
1.33 +- __attribute__ ((regparm (3), unused));
1.34 ++ ARCH_FIXUP_ATTRIBUTE;
1.35 + #endif
1.36 +
1.37 + /* Set up the loaded object described by L so its unrelocated PLT
1.38 +===================================================================
1.39 +--- /home/dank/downloads/glibc-2.3.2/elf/dl-runtime.c Fri Feb 7 11:41:12 2003
1.40 ++++ glibc-2.3.2/elf/dl-runtime.c Thu Apr 8 22:24:26 2004
1.41 +@@ -36,6 +36,12 @@
1.42 + # define VERSYMIDX(sym) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
1.43 + #endif
1.44 +
1.45 ++/* The fixup functions might have need special attributes. If none
1.46 ++ are provided define the macro as empty. */
1.47 ++#ifndef ARCH_FIXUP_ATTRIBUTE
1.48 ++# define ARCH_FIXUP_ATTRIBUTE
1.49 ++#endif
1.50 ++
1.51 +
1.52 + /* This function is called through a special trampoline from the PLT the
1.53 + first time each PLT entry is called. We must perform the relocation
1.54 +@@ -45,7 +51,7 @@
1.55 + function. */
1.56 +
1.57 + #ifndef ELF_MACHINE_NO_PLT
1.58 +-static ElfW(Addr) __attribute_used__
1.59 ++static ElfW(Addr) __attribute_used__ ARCH_FIXUP_ATTRIBUTE
1.60 + fixup (
1.61 + # ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
1.62 + ELF_MACHINE_RUNTIME_FIXUP_ARGS,
1.63 +@@ -132,7 +138,7 @@
1.64 +
1.65 + #if !defined PROF && !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__
1.66 +
1.67 +-static ElfW(Addr) __attribute_used__
1.68 ++static ElfW(Addr) __attribute_used__ ARCH_FIXUP_ATTRIBUTE
1.69 + profile_fixup (
1.70 + #ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
1.71 + ELF_MACHINE_RUNTIME_FIXUP_ARGS,