patches/glibc/2.3.6/180-glibc-2.3.6-allow-gcc-4.0-elf.patch
changeset 744 4bf8448536d5
parent 743 0bdbc96fecc0
child 745 e445c00d134d
     1.1 --- a/patches/glibc/2.3.6/180-glibc-2.3.6-allow-gcc-4.0-elf.patch	Mon Jul 28 11:43:29 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
    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>