Robert P. J. DAY says:
According to Mike Frysinger, this patch hasn't been necessary since
glibc-2.4+, so turf it from glibc patches 2.5 and up. If someone
complains, it can always go back in.
1.1 --- a/patches/glibc/2.5.1/130-glibc-2.3.6-allow-gcc-4.0-elf.patch Sun Feb 17 22:08:06 2008 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,67 +0,0 @@
1.4 -From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
1.5 -Fixes
1.6 - rtld.c: In function '_dl_start':
1.7 - dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
1.8 - dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
1.9 -when compiling glibc-2.3.4 with gcc-4.0
1.10 -
1.11 -But see also
1.12 -http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
1.13 -and
1.14 -http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
1.15 -which seem to propose less radical fixes?
1.16 -
1.17 -Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
1.18 -
1.19 ---- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
1.20 -+++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
1.21 -@@ -19,47 +19,6 @@
1.22 -
1.23 - #include <elf.h>
1.24 - #include <assert.h>
1.25 --
1.26 --#ifdef RESOLVE_MAP
1.27 --/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
1.28 -- ElfW(Addr), because not all architectures can assume that the
1.29 -- relocated address is properly aligned, whereas the compiler is
1.30 -- entitled to assume that a pointer to a type is properly aligned for
1.31 -- the type. Even if we cast the pointer back to some other type with
1.32 -- less strict alignment requirements, the compiler might still
1.33 -- remember that the pointer was originally more aligned, thereby
1.34 -- optimizing away alignment tests or using word instructions for
1.35 -- copying memory, breaking the very code written to handle the
1.36 -- unaligned cases. */
1.37 --# if ! ELF_MACHINE_NO_REL
1.38 --auto inline void __attribute__((always_inline))
1.39 --elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
1.40 -- const ElfW(Sym) *sym, const struct r_found_version *version,
1.41 -- void *const reloc_addr);
1.42 --auto inline void __attribute__((always_inline))
1.43 --elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
1.44 -- void *const reloc_addr);
1.45 --# endif
1.46 --# if ! ELF_MACHINE_NO_RELA
1.47 --auto inline void __attribute__((always_inline))
1.48 --elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
1.49 -- const ElfW(Sym) *sym, const struct r_found_version *version,
1.50 -- void *const reloc_addr);
1.51 --auto inline void __attribute__((always_inline))
1.52 --elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
1.53 -- void *const reloc_addr);
1.54 --# endif
1.55 --# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
1.56 --auto inline void __attribute__((always_inline))
1.57 --elf_machine_lazy_rel (struct link_map *map,
1.58 -- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
1.59 --# else
1.60 --auto inline void __attribute__((always_inline))
1.61 --elf_machine_lazy_rel (struct link_map *map,
1.62 -- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
1.63 --# endif
1.64 --#endif
1.65 --
1.66 - #include <dl-machine.h>
1.67 -
1.68 - #ifndef VERSYMIDX
1.69 -
1.70 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
2.1 --- a/patches/glibc/2.5/130-glibc-2.3.6-allow-gcc-4.0-elf.patch Sun Feb 17 22:08:06 2008 +0000
2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
2.3 @@ -1,67 +0,0 @@
2.4 -From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
2.5 -Fixes
2.6 - rtld.c: In function '_dl_start':
2.7 - dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
2.8 - dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
2.9 -when compiling glibc-2.3.4 with gcc-4.0
2.10 -
2.11 -But see also
2.12 -http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
2.13 -and
2.14 -http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
2.15 -which seem to propose less radical fixes?
2.16 -
2.17 -Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
2.18 -
2.19 ---- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
2.20 -+++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
2.21 -@@ -19,47 +19,6 @@
2.22 -
2.23 - #include <elf.h>
2.24 - #include <assert.h>
2.25 --
2.26 --#ifdef RESOLVE_MAP
2.27 --/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
2.28 -- ElfW(Addr), because not all architectures can assume that the
2.29 -- relocated address is properly aligned, whereas the compiler is
2.30 -- entitled to assume that a pointer to a type is properly aligned for
2.31 -- the type. Even if we cast the pointer back to some other type with
2.32 -- less strict alignment requirements, the compiler might still
2.33 -- remember that the pointer was originally more aligned, thereby
2.34 -- optimizing away alignment tests or using word instructions for
2.35 -- copying memory, breaking the very code written to handle the
2.36 -- unaligned cases. */
2.37 --# if ! ELF_MACHINE_NO_REL
2.38 --auto inline void __attribute__((always_inline))
2.39 --elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
2.40 -- const ElfW(Sym) *sym, const struct r_found_version *version,
2.41 -- void *const reloc_addr);
2.42 --auto inline void __attribute__((always_inline))
2.43 --elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
2.44 -- void *const reloc_addr);
2.45 --# endif
2.46 --# if ! ELF_MACHINE_NO_RELA
2.47 --auto inline void __attribute__((always_inline))
2.48 --elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
2.49 -- const ElfW(Sym) *sym, const struct r_found_version *version,
2.50 -- void *const reloc_addr);
2.51 --auto inline void __attribute__((always_inline))
2.52 --elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
2.53 -- void *const reloc_addr);
2.54 --# endif
2.55 --# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
2.56 --auto inline void __attribute__((always_inline))
2.57 --elf_machine_lazy_rel (struct link_map *map,
2.58 -- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
2.59 --# else
2.60 --auto inline void __attribute__((always_inline))
2.61 --elf_machine_lazy_rel (struct link_map *map,
2.62 -- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
2.63 --# endif
2.64 --#endif
2.65 --
2.66 - #include <dl-machine.h>
2.67 -
2.68 - #ifndef VERSYMIDX
2.69 -
2.70 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
3.1 --- a/patches/glibc/2.6.1/130-glibc-2.3.6-allow-gcc-4.0-elf.patch Sun Feb 17 22:08:06 2008 +0000
3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
3.3 @@ -1,67 +0,0 @@
3.4 -From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
3.5 -Fixes
3.6 - rtld.c: In function '_dl_start':
3.7 - dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
3.8 - dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
3.9 -when compiling glibc-2.3.4 with gcc-4.0
3.10 -
3.11 -But see also
3.12 -http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
3.13 -and
3.14 -http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
3.15 -which seem to propose less radical fixes?
3.16 -
3.17 -Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
3.18 -
3.19 ---- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
3.20 -+++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
3.21 -@@ -19,47 +19,6 @@
3.22 -
3.23 - #include <elf.h>
3.24 - #include <assert.h>
3.25 --
3.26 --#ifdef RESOLVE_MAP
3.27 --/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
3.28 -- ElfW(Addr), because not all architectures can assume that the
3.29 -- relocated address is properly aligned, whereas the compiler is
3.30 -- entitled to assume that a pointer to a type is properly aligned for
3.31 -- the type. Even if we cast the pointer back to some other type with
3.32 -- less strict alignment requirements, the compiler might still
3.33 -- remember that the pointer was originally more aligned, thereby
3.34 -- optimizing away alignment tests or using word instructions for
3.35 -- copying memory, breaking the very code written to handle the
3.36 -- unaligned cases. */
3.37 --# if ! ELF_MACHINE_NO_REL
3.38 --auto inline void __attribute__((always_inline))
3.39 --elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
3.40 -- const ElfW(Sym) *sym, const struct r_found_version *version,
3.41 -- void *const reloc_addr);
3.42 --auto inline void __attribute__((always_inline))
3.43 --elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
3.44 -- void *const reloc_addr);
3.45 --# endif
3.46 --# if ! ELF_MACHINE_NO_RELA
3.47 --auto inline void __attribute__((always_inline))
3.48 --elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
3.49 -- const ElfW(Sym) *sym, const struct r_found_version *version,
3.50 -- void *const reloc_addr);
3.51 --auto inline void __attribute__((always_inline))
3.52 --elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
3.53 -- void *const reloc_addr);
3.54 --# endif
3.55 --# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
3.56 --auto inline void __attribute__((always_inline))
3.57 --elf_machine_lazy_rel (struct link_map *map,
3.58 -- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
3.59 --# else
3.60 --auto inline void __attribute__((always_inline))
3.61 --elf_machine_lazy_rel (struct link_map *map,
3.62 -- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
3.63 --# endif
3.64 --#endif
3.65 --
3.66 - #include <dl-machine.h>
3.67 -
3.68 - #ifndef VERSYMIDX
3.69 -
3.70 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
4.1 --- a/patches/glibc/2.6/130-glibc-2.3.6-allow-gcc-4.0-elf.patch Sun Feb 17 22:08:06 2008 +0000
4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
4.3 @@ -1,67 +0,0 @@
4.4 -From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
4.5 -Fixes
4.6 - rtld.c: In function '_dl_start':
4.7 - dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
4.8 - dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
4.9 -when compiling glibc-2.3.4 with gcc-4.0
4.10 -
4.11 -But see also
4.12 -http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
4.13 -and
4.14 -http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
4.15 -which seem to propose less radical fixes?
4.16 -
4.17 -Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
4.18 -
4.19 ---- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
4.20 -+++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
4.21 -@@ -19,47 +19,6 @@
4.22 -
4.23 - #include <elf.h>
4.24 - #include <assert.h>
4.25 --
4.26 --#ifdef RESOLVE_MAP
4.27 --/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
4.28 -- ElfW(Addr), because not all architectures can assume that the
4.29 -- relocated address is properly aligned, whereas the compiler is
4.30 -- entitled to assume that a pointer to a type is properly aligned for
4.31 -- the type. Even if we cast the pointer back to some other type with
4.32 -- less strict alignment requirements, the compiler might still
4.33 -- remember that the pointer was originally more aligned, thereby
4.34 -- optimizing away alignment tests or using word instructions for
4.35 -- copying memory, breaking the very code written to handle the
4.36 -- unaligned cases. */
4.37 --# if ! ELF_MACHINE_NO_REL
4.38 --auto inline void __attribute__((always_inline))
4.39 --elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
4.40 -- const ElfW(Sym) *sym, const struct r_found_version *version,
4.41 -- void *const reloc_addr);
4.42 --auto inline void __attribute__((always_inline))
4.43 --elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
4.44 -- void *const reloc_addr);
4.45 --# endif
4.46 --# if ! ELF_MACHINE_NO_RELA
4.47 --auto inline void __attribute__((always_inline))
4.48 --elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
4.49 -- const ElfW(Sym) *sym, const struct r_found_version *version,
4.50 -- void *const reloc_addr);
4.51 --auto inline void __attribute__((always_inline))
4.52 --elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
4.53 -- void *const reloc_addr);
4.54 --# endif
4.55 --# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
4.56 --auto inline void __attribute__((always_inline))
4.57 --elf_machine_lazy_rel (struct link_map *map,
4.58 -- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
4.59 --# else
4.60 --auto inline void __attribute__((always_inline))
4.61 --elf_machine_lazy_rel (struct link_map *map,
4.62 -- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
4.63 --# endif
4.64 --#endif
4.65 --
4.66 - #include <dl-machine.h>
4.67 -
4.68 - #ifndef VERSYMIDX
4.69 -
4.70 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>